LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux From Scratch (https://www.linuxquestions.org/questions/linux-from-scratch-13/)
-   -   Grub error right at end (https://www.linuxquestions.org/questions/linux-from-scratch-13/grub-error-right-at-end-413795/)

simcox1 02-10-2006 08:00 AM

Grub error right at end
 
I've got to the very last part of this lfs install and have a grub problem. I'm doing LFS 6.1.1 using mandriva LE2005.

All has worked up till now. Trying to put the boot loader onto a floppy appeared not to work. There was no noise from the floppy drive, although no errors on screen. Just the usual files in, files out etc.

Anyway, I launched the grub screen, and telling it

root (hd0,2)

(For /dev/hda3) returns error 21, device not found. Somethings wrong here. I'd prefer jsut to put it on a floppy anyway, as mandriva uses lilo. I'm not familiar with grub either.

At the moment my /boot/grub directory has this in it:

e2fs_stage1_5 iso9660_stage1_5 reiserfs_stage1_5 stage1 stage2

I stopped yesterday at the end of chapter 6, so perhaps I've missed something when chrooting back into the build.

Thanks.

-----------------------------------------

Just to add here that using tab in the grub screen after typing 'root' gives me the possible options of 'fd0' or 'cd'.

aus9 02-10-2006 08:55 AM

do not know about LFS but do you have write powers to a floppy drive.....check your /etc/fstab or use the manual mount command b4 dumping stuff using the dd command.

if that fails check if you have a /boot/grub/map.device or similar named file then you may need to start grub with a force command ....since you have the manual do a search under device

simcox1 02-10-2006 09:26 AM

I've got write permissions as I'm root. I'd prefer it on a floppy as well. But my boot/grub looks empty. Should I have a menu.lst in there? I don't know grub much. LFS is all about following instructions.

aus9 02-11-2006 07:25 AM

normally you have a number of files under /boot/grub including the menu.lst as per tutorial.

some distros prefer to use /etc/grub.conf but this is normally a linked file to /boot/grub/menu.lst so not a good sign that you have no menu.

search the syntax of what commands you need to boot your kernel and initrd in the appropiate forum and just create the file......when you run a live cd to setup grub.....grub will search for a menu.lst file and the booting files especially the stage 1 and 2 file.....stage 1 is actually a replacement for your mbr.....but stage 2 files are the real booting files.


since you like instructions.....grab a kanotix cd and boot it and then have a look at how KANO has his structured. Basically you can use the live cd to copy all of /boot/grub from cd to your /boot and then amend his menu.lst so that it points to the correct kernel and initrd (if used) and the correct syntax for the root=/dev/hdx or sdY

simcox1 02-11-2006 01:21 PM

The main problem with LFS is following instructions. You can build an entire linux system from scratch, and still not have a clue what you're doing. I got it to boot, which was quite good, via a floppy. I think it was a permissions problem before as I was in a chroot but with a different password. The grub boot floppy put me at a grub prompt from where I had to tell it the root partition (hd0,2), the kernel image file, and finally tell it to boot. It's a bit cumbersome but I don't want grub on the mbr just yet. I did try adding lfs to my lilo.conf but it didn't like it.

The menu.lst is the equivalent of lilo.conf I guess.

aus9 02-13-2006 07:15 AM

try reading my tutorial on how to create bootable floppies with your own menu that will do it all for you if you like to stay with floppy for awhile

ToK 02-16-2006 01:39 AM

Maybe it's simple: try to mount proc (mount -t proc proc /mnt/lfs/proc) since grub needs the infos from /proc. Then chroot to /mnt/lfs and try to install grub;)

ToK

shotokan 02-16-2006 04:53 AM

Are there any device nodes under /dev?


All times are GMT -5. The time now is 06:50 PM.