LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux From Scratch (http://www.linuxquestions.org/questions/linux-from-scratch-13/)
-   -   Error booting LFS 7.1 (http://www.linuxquestions.org/questions/linux-from-scratch-13/error-booting-lfs-7-1-a-941163/)

CincinnatiKid 04-22-2012 02:44 PM

Error booting LFS 7.1
 
I just finished my basic LFS setup. I did not follow the instructions to set up a new grub install because I wanted to use my current grub install.

I am on Mageia 1 which uses Grub 0.97. My LFS system is on /dev/sdb1. Here are the contents of my /boot/grub/menu.lst (you can see the lfs entry that I added):

Code:

timeout 10
color black/cyan yellow/cyan
password --md5 $1$vQJgb0$m1x0LIb9JhONgxl4LnXxT0
default 0

title linux
kernel (hd0,0)/boot/vmlinuz BOOT_IMAGE=linux root=UUID=1116d9a6-351e-41ed-bc36-3c225e04db4c  resume=UUID=f9c9ba08-0b12-4169-b734-bf7214b66aca splash=silent vga=788
initrd (hd0,0)/boot/initrd.img

title linux-nonfb
kernel (hd0,0)/boot/vmlinuz BOOT_IMAGE=linux-nonfb root=UUID=1116d9a6-351e-41ed-bc36-3c225e04db4c  resume=UUID=f9c9ba08-0b12-4169-b734-bf7214b66aca
initrd (hd0,0)/boot/initrd.img

title failsafe
kernel (hd0,0)/boot/vmlinuz BOOT_IMAGE=failsafe root=UUID=1116d9a6-351e-41ed-bc36-3c225e04db4c  failsafe
initrd (hd0,0)/boot/initrd.img

title lfs
root (hd1,0)
kernel /boot/vmlinuz-3.2.6-lfs-7.1 root=/dev/sdb1

In case it makes a difference, menu.lst and my grub install exists on /dev/sda1.

Here is the error that I get when try to boot lfs from grub:

Code:

Booting LFS
root (hd1,0)
Filesystem type is ext2fs, partition type 0x83
kernel /boot/vmlinuz-3.2.6-lfs-7.1 root=/dev/sdb1
Error 15: File not found

I think I got all of the correct, I wrote it down on a piece of paper. what is really weird is that it says "Filesystem type is ext2fs", but /dev/sdb1 is actually ext3.

Please help me get to the bottom of this.

spiky0011 04-22-2012 03:12 PM

Hi

Should that read root=(hd1,1)
Presume boot is root dir and not on it's own partition

CincinnatiKid 04-22-2012 03:39 PM

Quote:

Originally Posted by spiky0011 (Post 4660078)
Hi

Should that read root=(hd1,1)
Presume boot is root dir and not on it's own partition

This time I got "Error 17: Cannot mount selected partition". /boot is under /, it does not have it's own partition.

CincinnatiKid 04-22-2012 03:45 PM

Should I be putting these files:

config-3.2.6 System.map-3.2.6 vmlinuz-3.2.6-lfs-7.1

in my $LFS/boot, or in my Mageia /boot (the one with the grub stuff)? Currently they are in $LFS/boot.

spiky0011 04-22-2012 03:56 PM

It should read set root=(hd1,0) sorry.

They go in lfs boot

Try changing the sdb to hdb

kernel /boot/vmlinuz-3.2.6-lfs-7.1 root=/dev/hdb1

You might have to change the /dev/sdbx to /dev/hdbx in /etc/fstab

CincinnatiKid 04-22-2012 04:14 PM

I changed back to root (hd1,0) and tried with both hdb1 and sdb1, including changing my fstab, and I am still getting the Error 15: file not found.

TobiSGD 04-22-2012 04:25 PM

Please post the exact contents of your $LFS/boot directory, also the output of
Code:

fdisk -l
Also, I wonder why you are inconsistent in your own configuration files, one time you write
Code:

kernel (hd0,0)/boot/vmlinuz ...
, the other time it is
Code:

root (hd1,0)
kernel /boot/vmlinuz ...

This normally shouldn't matter, but I have seen weird things already, so I would at least try if it makes a difference when you try the first notation with your LFS option.

CincinnatiKid 04-22-2012 04:28 PM

I just figured out that the entire time, I was working in /mnt/lfs, I thought that sdb1 was mounted in /mnt/lfs, but it wasn't, hopefully I can just move all of my work over to sdb1 and have it all work, I will let you know my results.

I am not sure if this will even work since I was not working in a different partition. This can be bad, I may have to start all over again!

spiky0011 04-22-2012 04:33 PM

Is sdb1 a partition on hard disk or usb disk?

CincinnatiKid 04-22-2012 04:39 PM

It is on a hard disk. I copied everything to it, the system attempted to boot, but I got gobs of errors that I will attempt to work out. My fear is that I will have to start everything from scratch.

CincinnatiKid 04-22-2012 04:59 PM

I am getting a lot of messages during bootup about things being read only. Has anyone experienced anything like that? I will try to capture some of these error messages and post them.

TobiSGD 04-22-2012 05:10 PM

As long as you were chrooted to /mnt/lfs it shouldn't matter if it is a directory or a partition. In fact, the system shouldn't care at all about something like that.
Since you are a long time member here you should already know that "I am getting a lot of messages during bootup about things being read only." is not a sufficient error description. Please post when exactly those error-messages appear and which "things" are reported being read-only.

CincinnatiKid 04-22-2012 05:21 PM

Good news, I was chrooted the entire time.

Here is the first set of error messages:

Code:

mount: unknown filesystem type 'devtmpfs'
ln: failed to create symbolic link '/dev/shm': read only filesystem
cp: cannot find '/dev/null': read only file system

My filesystem type is ext3.

I tar'd everything that was in /mnt/lfs and copied it to my second hard drive, and then untar'd it, could this be a part of why there is some kind of problem?

TobiSGD 04-22-2012 05:44 PM

There seems to be an error in your /etc/fstab. This causes the /dev filesystem not to be mounted as tmpfs, as is pretty normal nowaydays, which in turn prevent the device nodes and symlinks in /dev from being created (it seems that at this point the /-filesystem is still mounted read-only).

CincinnatiKid 04-22-2012 06:42 PM

Here is my fstab:

Code:

# Begin /etc/fstab

# file system  mount-point  type    options            dump  fsck
#                                                              order

/dev/sdb1    /            ext3    defaults            1    1
/dev/sdb5    swap        swap    pri=1              0    0
proc          /proc        proc    nosuid,noexec,nodev 0    0
sysfs          /sys        sysfs    nosuid,noexec,nodev 0    0
devpts        /dev/pts    devpts  gid=4,mode=620      0    0
tmpfs          /run        tmpfs    defaults            0    0
devtmpfs      /dev        devtmpfs mode=0755,nosuid    0    0

# End /etc/fstab

here is the sdb part of fdisk -l:
Code:

Disk /dev/sdb: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders, total 312581808 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xdd5bdd5b

  Device Boot      Start        End      Blocks  Id  System
/dev/sdb1  *          63    41351309    20675623+  83  Linux
/dev/sdb2        41351310    86622479    22635585    5  Extended
/dev/sdb5        41351373    45656729    2152678+  82  Linux swap / Solaris
/dev/sdb6        45656793    86622479    20482843+  83  Linux

Any ideas on what is causing the problem with fstab?


All times are GMT -5. The time now is 11:42 PM.