I get distraught with GRUB

Urke MMI see-RFC-822 at gmx.net
Sat Nov 6 00:44:03 PST 2004


In the last week I build LFS version SVN-20041017 following book. All
actions passed great, but I stop in  Chapter 8 in part Making the LFS
system bootable (grub setup). My main box is Slackware 9.1 and fast
builded old 2.6.2 kernel (I not use it in Slackware, I use 2.4.24, but
some days ago I build and 2.6.2 :).

I prepare my HDD in this way:

/dev/hdb1  [primary 1, boot]  0x83     /boot    ext2   128 MB
/dev/hdb2  [primary 2]        0x83     /        ext2     4 GB
/dev/hdb3  [primary 3]        0x83     /usr     ext2    12 GB
/dev/hdb4  [extended]         0x05
/dev/hdb5  [logical]          0x83     /tmp     ext2     2 GB
/dev/hdb6  [logical]          0x83     /var     reiser   2 GB
/dev/hdb7  [logical]          0x82     swap     swap   512 MB
/dev/hdb8  [logical]          0x83     /home    ext2    33 GB
/dev/hdb9  [logical]          0x83     /arhiva  ext2    66+ GB

I mount this partitions for building LFS with this bash script:

:~--- start of setup-lfs.sh --

export LFS=/mnt/lfs

# postavljanje swapa
swapon /dev/hdb7

# montiranje LFS particija
if [ ! -d $LFS ]; then mkdir $LFS; fi
mount /dev/hdb2 /mnt/lfs
if [ ! -d $LFS/boot ]; then mkdir $LFS/boot; fi
mount /dev/hdb1 $LFS/boot
if [ ! -d $LFS/usr ]; then mkdir $LFS/usr; fi
mount /dev/hdb3 $LFS/usr
if [ ! -d $LFS/tmp ]; then mkdir $LFS/tmp; fi
mount /dev/hdb5 $LFS/tmp
if [ ! -d $LFS/var ]; then mkdir $LFS/var; fi
mount -t reiserfs /dev/hdb6 $LFS/var
if [ ! -d $LFS/home ]; then mkdir $LFS/home; fi
mount /dev/hdb8 $LFS/home

# montiranje virtuelnih fajl sistema
if [ ! -d $LFS/proc ]; then mkdir $LFS/proc; fi
mount -t proc proc $LFS/proc
if [ ! -d $LFS/sys ]; then mkdir $LFS/sys; fi
mount -t sysfs sysfs $LFS/sys
mount -f -t ramfs ramfs $LFS/dev
mount -f -t tmpfs tmpfs $LFS/dev/shm
mount -f -t devpts -o gid=4,mode=620 devpts $LFS/dev/pts

#ln -s $LFS/tools /

# priprema za LFS
if [ ! -d $LFS/sources ]; then
    mkdir $LFS/sources;
    chmod a+wt $LFS/sources
:~--- end of setup-lfs.sh --

After that, I chroot in my LFS with:

:~--- one line ---
chroot "$LFS" /usr/bin/env -i HOME=/root TERM="$TERM" PS1='\u:\w\$ '
PATH=/bin:/usr/bin:/sbin:/usr/sbin /bin/bash --login
:~--- /one line ---

There is my (/mnt/lfs)/boot/grub/menu.lst

:~--- start of menu.lst ---
# Begin /boot/grub/menu.lst

# By default boot the first menu entry
default 0

# Allow 30 seconds bfore booting the default
timeout 30

# Use prettier colors
color green/black light-green/black

# The first entry for LFS
title LFS SVN-20041017
root (hd1,0)
kernel (hd1,0)/lfskernel- root=(hd1,1)

# Old Slackware
title Slackware 2.4.24 LAN
root (hd0,8)
kernel (hd0,8)/vmlinuz-2.4.24_LAN root=(hd0,8)

# End /boot/grub/menu.lst
:~--- end of menu.lst ---

And, my fstab on LFS box:

# Begin /etc/fstab

# system	mount-point	fs-type		options		dump	fsck-order
/dev/hdb2	/		ext2		defaults	1	1
/dev/hdb1	/boot		ext2		defaults	1	1
/dev/hdb3	/usr		ext2		defaults	1	2
/dev/hdb4	/tmp		ext2		defaults	1	2
/dev/hdb6	/var		reiserfs	defaults	1	2
/dev/hdb8	/home		ext2		defaults	1	2
/dev/hdb9	/arhiva		ext2		users,owner,exec	1	2
/dev/cdrom	/mnt/cdrom	iso9660		noauto,owner,ro,unhide,user	0	0
/dev/sda1	/mnt/camera	vfat		noauto,owner,user,unhide	0	0
/dev/hdb7	swap		swap		pri=1		0	0
proc		/proc		proc		defaults	0	0
sysfs		/sys		sysfs		defaults	0	0
devpts		/dev/pts	devpts		gid=4,mode=620	0	0
shm		/dev/shm	tmpfs		defaults	0	0
usbfs		/proc/bus/usb	usbfs		devgid=14,devmode=0660	0	0

#End /etc/fstab

Now problems and my situation:

After I finish building LFS, I reboot to main box (Slackware + kernel
2.4.24). Before couple days I get time to finish my LFS, and boot into
Slackware with kernel 2.6.2, run my setup-lfs.sh script and chroot into
LFS. Made menu.lst for GRUB as I noticed up there, and run grub. I never
before use GRUB (only lilo) so I'm confused with GRUB sintax.

I wish to put GRUB on primary slave HDD (/dev/hdb) MBR, so I type:

> setup (hd1,0)

But, then I get this:

Error 12: Invalid device requested

I try with (hd1), but error persist. Then I check /dev and only devices
there is pts and shm. So, nowhere is hd* devices. Do I need to make it by
myself (with setup-lfs.sh) or what? What I'm forgot?

I'm confused and I not know what to read to solve this problem. Please,
give me some tips :)


P.S. My e-mail described in X-E-Mail: RFC-822 header

         URKE MMI :: www.urosevic.net :: ICQ UIN 104794867         
 Registered Linux User #280650 [counter.li.org] :: SLACKWARE LINUX 

More information about the lfs-support mailing list