Advice please?(Re: [Sussex] Getting brave ?, perhaps not.)
Trevor Marshall
trevorm at rusham.demon.co.uk
Mon Dec 8 22:12:22 UTC 2003
OK, I'm coming to this a bit late, but let's see....
On Mon, 2003-12-08 at 04:26, John D. wrote:
> On Sunday 07 Dec 2003 3:26 pm, John Crowhurst wrote:
> <snip>
> > mtab is the mount table for what is currently mounted, it is what mount
> > uses to know what is currently mounted. Use fstab to load partitions on
> > startup.
> >
> > To load all the partitions in fstab use:
> >
> > ~# mount -a
>
> The "#mount -a" command just dropped me back into a # prompt,
Yup, that's what tends to happen with *nix commands when they work - and
it's confusing the first time. If there's no output it's just done what
you asked it to. It's really annoying 'till you get used to it..
There's a whole load of hidden info in John's instruction. The '#' at
the beginning is normally the command line prompt for root, so he means
do it as 'root'. The command is
mount -a
which will mount all the file systems that you've got defined in your
/etc/fstab file.
[ You /weren't/ typing the '#' were you? If you include the '#' at the
beginning of the bit you type, then the shell (that you're typing into)
will likely treat it as a comment. You can try it by typing
ls
then type
#ls
you should see the difference]
> so I wasn't sure
> what to do from there, but your suggestion about the fstab (plus I saw Dave
> Chapman at work and he suggested using knoppix to look at the fstab to see
> how it had "seen" the partition, though I would have to work out which was
> the gentoo partition). The fstab currently looks like this,
>
> <snip>
> /dev/hda2 / ext3 defaults 1 1
> none /dev/pts devpts mode=0620 0 0
> none /mnt/cdrom supermount
> dev=/dev/hdb,fs=auto,ro,--,iocharset=iso8859-15,codepage=850,umask=0 0 0
> none /mnt/cdrom2 supermount
> dev=/dev/scd0,fs=auto,ro,--,iocharset=iso8859-15,codepage=850,umask=0 0 0
> none /mnt/floppy supermount
> dev=/dev/fd0,fs=auto,--,iocharset=iso8859-15,sync,codepage=850,umask=0 0 0
> /dev/hda1 /mnt/windows ntfs iocharset=iso8859-15,ro,umask=0 0 0
> none /proc proc defaults 0 0
> /dev/hda3 swap swap defaults 0 0
OK, there's no /dev/hda4 in your fstab, so 'mount -a' won't find it and
mount it.
> and from knoppix I got "/dev/hda4 /mnt/hda4 ext3 noauto,users,exec 0 0".
Looks like there /is/ and a /dev/hda4 partition on the disk then.
> I tried various things like changing the /mnt/hda4 to /mnt/gentoo/hda4 (I made
> a directory called gentoo), and I just tried the identical output that I got
> from knoppix, but all it said was that I didn't have a "final newline" -
> whatever that could be, and I still couldn't manage to make it see the
> partition (I'm still convinced that I'm doing something fundamentally stupid
> - personal ignorance is a big factor in "this equation")
Hmm, looks like /etc/fstab needs to have a 'return' at the end of the
last line. You can add a blank line on to the end, mount shouldn't
complain at that.
> >
> > Under DOS partitioning system you can only have 4 primary partitions. To
> > get around this problem, Microsoft created a sub-partition system called
> > extended partitions, where you lose a partition to become sub partitions.
> > Logical partitions under Microsoft are there so that they can be labelled
> > with an easy label as in C, D etc.
> >
> > You would need to create:
> >
> > hda1 = Windows
> > hda2 = Mandrake
> > hda3 = Swap
> > hda4 = Extended
> > +hda5 = Gentoo boot
> > +hda6 = Gentoo root
> >
> > Or you could have:
> >
> > hda1 = Windows
> > hda2 = Swap
> > hda3 = Extended
> > + hda5 = Mandrake Boot
> > + hda6 = Mandrake Root
> > + hda7 = Gentoo Boot
> > + hda8 = Gentoo Root
> >
> I tried to do what you have suggested in the first bit, but for some strange
> reason (probably stupidity), I couldn't manage to make partition magic do
> this, as it seemed to follow Steve Dobson's suggestion of having the swap
> between the two linux install's - something about head movement between the
> swap and either of the distro's (Sorry Steve, I got a little over excited
> with my delete button).
OK, what do you actually have as partitions on /dev/hda? Can you post
the output of fdisk -l? As root, or using sudo, what do you get if you
type
fdisk -l /dev/hda
That should give you a list of partitions on the disk. For example, on
my system I have Linux on the second hard disk, and so for /dev/hdb I
get:
trevorm> sudo fdisk -l /dev/hdb
Disk /dev/hdb: 32 heads, 63 sectors, 32765 cylinders
Units = cylinders of 2016 * 512 bytes
Device Boot Start End Blocks Id System
/dev/hdb1 1 31 30712+ 83 Linux
/dev/hdb2 31 1071 1048824 82 Linux swap
/dev/hdb3 1072 3103 2048256 83 Linux
/dev/hdb4 3104 32766 29899800 5 Extended
/dev/hdb5 3104 13262 10240240+ 83 Linux
/dev/hdb6 13263 17326 4095976+ 83 Linux
/dev/hdb7 17326 32766 15563488+ 83 Linux
Because /dev/hdb4 is an extended partition, I can't actually mount it.
I /can/ mount /dev/hdb5|6|7 though, and they have entries like this in
/etc/fstab:
/dev/hdb5 /usr ext2 defaults 0 2
/dev/hdb6 /var ext2 defaults 0 2
/dev/hdb7 /home ext2 defaults 0 2
> Do you think that it's a good idea "to throw caution to the wind" and start
> from scratch (which I was trying to avoid) i.e. would this be the best idea
> ???
>
> <snip>
> > > image=/boot/kernel-2.4.20-gentoo-r6
> > > label="Gentoo"
> > > root=/dev/hda4
> > > initrd=/boot/initrd-2.4.20-gentoo-r6
> > > append="devfs=mount hdc=ide-scsi"
> > > read-only
> <snip>
> > What was the error message when you tried it?
>
> When I did the above, the error was:
>
> Boot image: /boot/kernel-2.4.20-gentoo-r6
> Fatal: open /boot/kernel-2.4.20-gentoo-r6: No such file or directory
>
> <snip>
> > Sounds like the kernel image was too big for the floppy. Have a look at
> > the size of this kernel image with ls -l /boot/kernel-2.4.20-gentoo-r6
> >
> > You can mount the floppy to a loopback device and see what is on it that
> > way or mount it to a directory, with:
> >
> > ~# mount /dev/fd0 /mnt/floppy
>
> I've tried to see if I can do the ls -l /boot/kernel-2.4.20-gentoo-r6 but just
> get the "no such file or directory" error.
>
> When I try the "# mount /dev/fd0 /mnt/floppy" command, I'm just getting a bash
> reply
> [root at localhost john]# mount /dev/fd0 /mnt/floppy
> mount: you must specify the filesystem type
> [root at localhost john]#
try
mount -t vfat /dev/fd0 /mnt/floppy
> The floppy drive light comes on for a while before I get the above reply, and
> I've tried various "letters" (-t and stuff like that - are these the "things"
> called arguements ? ) anyhow, I've tried various ones that I've found at "man
> mount" and I just get dropped into the man page for mount.
Yup, "these" are the things called arguments. The '-t' argument
specifies the type of file system to mount - in this case the file
system type is 'vfat'.
> Hence any advice/suggestions/idea's for the best "way forwards" (god, that
> sounds so "new Labour") would be excellent.
>
> Just a quick additional one. Am I presuming correctly, that while bootloaders
> normally go in the first part of the hard disc, If I installed lilo for the
> gentoo install in the linux partition, would I be able to boot it from there
> somehow or would it cause conflict with the mandrake version currently
> resident in the first part of the hard drive ?
I'm no expert on bootloaders, but I reckon you only want to have one,
and add information for each OS to that, that's the system I use, but I
only try to dual boot. Maybe someone else has a better idea for more
than two OSs.
HTH,
--
Trevor Marshall
More information about the Sussex
mailing list