Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

In my operating systems class we had to modify the boot screen of the Minix OS. I understood just about everything we did, but at the end of the make for compiling the new OS, there's a line:

cp image /dev/c0d0p0:/minix/2.0.4r2

I don't understand what the colon is for, can anybody explain this? I've searched all over with no luck.

share|improve this question
1  
Were you doing the compilation under Minix, or under some other operating system? –  Gilles Sep 9 '12 at 21:53
    
It was in Minix. –  twchapman Sep 9 '12 at 22:17
1  
Do you have a link to the rest of your instructions? Is this command entered in the normal shell, or in a special screen like a boot prompt? - EDIT: Are you sure it was a cp, and not an mtools copy? –  Random832 Oct 9 '12 at 23:26
add comment

migrated from stackoverflow.com Sep 9 '12 at 22:21

This question came from our site for professional and enthusiast programmers.

2 Answers

If you don't get a better answer, I'll take a near-wild guess at it:

It seems like that line allows you to copy a file to a device that may not be mounted by specifying the device /dev/c0d0p0 and the file /minix/2.0.4r2.

share|improve this answer
    
Thanks Jeremy, I was actually just considering that. I think that, because it has to move the image to the boot sector (is that even right?) it would have to specify a device outside the Minix filesystem and on to the root drive. Would that make sense? –  twchapman Sep 9 '12 at 22:17
    
The boot sector a whole different beast. I'll be honest, I've not used Minix in over 25 years and it was a way different beast back then... but it isn't unheard of for *nix variants to keep the boot code on a different partition. –  Jeremy J Starcher Sep 9 '12 at 22:20
add comment

I found the answer. This is not a command. It is output.

The mkboot script echoes this to the screen in the following section:

echo "cp image $root:/minix/$target"
cp -p image $rootdir/minix/$target || exit

The $rootdir variable indicates a directory on which it has mounted the $root device earlier in the script, if the target root is something other than the actual mounted root:

case $action in
bootable | hdboot)
    # We need the root device.
    if [ $realroot = $root ]
    then
        rootdir=
    else
        umount $root 2>/dev/null
        mount $root /root || exit
        rootdir=/root
    fi
esac
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.