grub, kernel and mount woes
Karl Larsen
k5di at zianet.com
Sat Nov 17 13:07:19 UTC 2007
Thufir wrote:
> Got the grub.conf file mounted! Just trying to work out the kinks of
> grub, but am certainly learning how it all works together :)
>
> for posterity:
>
>
> [root at localhost ~]#
> [root at localhost ~]#
> [root at localhost ~]#
> [root at localhost ~]#
> [root at localhost ~]# cat /etc/fstab
> LABEL=/ / ext3 defaults 1 1
> LABEL=/boot /boot ext3 defaults 1 2
> tmpfs /dev/shm tmpfs defaults 0 0
> devpts /dev/pts devpts gid=5,mode=620 0 0
> sysfs /sys sysfs defaults 0 0
> proc /proc proc defaults 0 0
> /dev/VolGroup00/LogVol01 swap swap defaults 0 0
> /dev/VolGroup01/LogVol01 swap swap defaults 0 0
> #/dev/sda1 /mnt/sda1 ntfs-3g users,rw 0 0
> /dev/sda2 /mnt/sda2 ext3 users,rw 0 0
> /dev/sdb1 /mnt/sdb1 ext2 users,rw 0 0
> #/dev/sdb2 /mnt/sdb2 ext3 users,rw 0 0
> /dev/sdb3 /mnt/sdb3 ext3 users,rw 0 0
> [root at localhost ~]#
> [root at localhost ~]# mount
> /dev/mapper/VolGroup00-LogVol00 on / type ext3 (rw)
> proc on /proc type proc (rw)
> sysfs on /sys type sysfs (rw)
> devpts on /dev/pts type devpts (rw,gid=5,mode=620)
> /dev/sda2 on /boot type ext3 (rw)
> tmpfs on /dev/shm type tmpfs (rw)
> /dev/sdb3 on /mnt/sdb3 type ext3 (rw,noexec,nosuid,nodev)
> none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
> sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
> /dev/sda2 on /mnt/sda2 type ext3 (rw,noexec,nosuid,nodev)
> /dev/sdb1 on /mnt/sdb1 type ext2 (rw,noexec,nosuid,nodev)
> [root at localhost ~]#
> [root at localhost ~]# ll /mnt/sdb1/boot/
> total 11033
> lrwxrwxrwx 1 root root 1 2007-07-26 02:45 boot -> .
> drwxr-xr-x 2 root root 1024 2007-11-17 00:08 grub
> -rw-r--r-- 1 root root 5455004 2007-04-21 15:45
> initramfs-genkernel-x86-2.6.19-gentoo-r5
> -rw-r--r-- 1 root root 2137705 2007-04-21 15:43
> kernel-genkernel-x86-2.6.19-gentoo-r5
> -rw-r--r-- 1 root root 2658736 2007-11-16 23:52 kernel-with-alsa
> drwx------ 2 root root 12288 2007-07-26 02:36 lost+found
> -rw-r--r-- 1 root root 980149 2007-04-21 15:43
> System.map-genkernel-x86-2.6.19-gentoo-r5
> [root at localhost ~]#
> [root at localhost ~]# cat /mnt/sdb1/boot/grub/grub.conf
> default 0
> timeout 30
> splashimage=(hd1,0)/grub/splash.xpm.gz
>
> title=Gentoo Linux with ALSA
> root (hd1,0)
> kernel /kernel-has-alsa root=/dev/ram0
>
> title Fedora (2.6.21-1.3228.fc7)
> root (hd0,1)
> kernel /vmlinuz-2.6.21-1.3228.fc7 ro root=LABEL=/ rhgb quiet
> initrd /initrd-2.6.21-1.3228.fc7.img
> [root at localhost ~]#
> [root at localhost ~]# cat /etc/fedora-release
> Fedora release 7 (Moonshine)
> [root at localhost ~]#
> [root at localhost ~]# date
> Sat Nov 17 01:04:07 PST 2007
> [root at localhost ~]#
>
>
>
> thanks,
>
> Thufir
>
>
A lot cleaner way to boot several systems on the same computer is to
define a main system which has it's grub setup on (hd0) and it all
works. Then on system 2 you have another grub set up but this one has
it setup on it's /boot partition and the root is also /boot. Now this
system 2 is booted from the main grub with a chainload call.
Here is an example from my computer which has 3 systems, F7 , F7-64
and F8. Here is the main F7 grub.conf:
# grub.conf
#
#boot=/dev/sda
default=0
timeout=5
splashimage=(hd0,5)/grub/splash.xpm.gz
hiddenmenu
title Fedora (2.6.23.1-21.fc7)
root (hd0,5)
kernel /vmlinuz-2.6.23.1-21.fc7 ro root=LABEL=f7-main quiet
initrd /initrd-2.6.23.1-21.fc7.img
title Fedora (2.6.23.1-10.fc7)
root (hd0,5)
kernel /vmlinuz-2.6.23.1-10.fc7 ro root=/dev/sda5 quiet
initrd /initrd-2.6.23.1-10.fc7.img
title Fedora (2.6.22.5-76.fc7)
root (hd0,5)
kernel /vmlinuz-2.6.22.5-76.fc7 ro root=/dev/sda5 quiet
initrd /initrd-2.6.22.5-76.fc7.img
title Fedora f7-64
root (hd1,2)
chainloader +1
title Fedora 8
root (hd1,5)
chainloader +1
See the last 2 titles are the other systems that are chain loaded
and work just fine.
Now here is the /etc/fstab on F7:
[root at k5di etc]# cat fstab
LABEL=f7-main / ext3 defaults 1 1
tmpfs /dev/shm tmpfs defaults 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
sysfs /sys sysfs defaults 0 0
proc /proc proc defaults 0 0
LABEL=f7-swap swap swap defaults 0 0
LABEL=f7-home /home ext3 defaults 1 2
LABEL=f7-boot /boot ext3 defaults 1 2
The LABEL=f7-home is a partition that is used by the other 2 systems
and it contains all the stuff under my user directory /home/karl/.
I think you can see this is a lot cleaner way to access lots of systems.
--
Karl F. Larsen, AKA K5DI
Linux User
#450462 http://counter.li.org.
More information about the fedora-list
mailing list