Linux From ScratchThis Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hello everybody, I have a problem at the boot of my LFS (6.6). The trace is:
Populating /dev with device nodes
[ 4.7497771] modprobe used greatest stack depth: 6044 bytes left
[ 5.1244071] mkdir used greatest stack depth: 6024 bytes left [ ok]
Activating all swap files/partitions
swapon: /dev/sda3: stat failed: No such file or directory [ Fail ]
Mounting root file system in read-only mode [ ok ]
Checking file systems
fsck.ext3 No such file or directory while trying to open /dev/sda2
/dev/sda2:
The sperblock could not be read or dose not describe a correct ext2
file system. If the device is valid and it really contains an ext2
file system (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternative superblock:
e2fsck -b 8193 <device>
FAILURE
I am working on virtual machine VMWare workstaion 7, I'm using an SCSI disque and my kernel version is 2.6.32.8. (the construction of my system LFS 6.6 is well).
My host is debian 5.
Thank you for your answers (and sorry for my english).
Hi, thank you for your answer druuna,
Yes I tried, there are the same problem. The trace talk about ext2 but I am in ext3 !
May be have I forgotten a module in the kernel configuration, or an bad configuration ?
First: I just noticed I swapped sda2 and sda3 in the example in post #2: swap is on sda3 and root on sda2. I'll edit post #2 to reflect the correct situation.
I do hope you tried with the correct settings....
I don't think this is related to the FS being ext2 or ext3. Both partitions are not found, one holds a FS the other is swap. Can you post the output generated by this command:
Code:
fdisk -l
And also your /etc/fstab.
You could be correct about missing a kernel setting. Check if Device Drivers -> Serial ATA... is set and if the correct settings in that sub-menu are present (ATA SFF and the appropriate controller option?).
Here the output of the commande fdisk -l (from my host):
Quote:
Disk /dev/sda: 214.7 GB, 214748364800 bytes
255 heads, 63 sectors/track, 26108 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
Disk identifier: 0x000acd22
Device Boot Start End Blocks Id System
/dev/sda1 1 12158 97659103+ 83 Linux
/dev/sda2 12223 21145 71673997+ 83 Linux
/dev/sda3 21146 21400 2048287+ 82 Linux swap / Solaris
I set the module to yes in Device Drivers -> Serial ATA...
My LFS boot.
To start, in my fstab, I use the UUID of my hard drive instead /dev/sda2.
Then, I set to '0' the last parameter of the first line of my fstab. My fstab looks like this:
Sorry for my mistake druuna, I made the modification of my fstab this morning (before your post). The modification of the fstab is the only one
(without this modification (in post 7), LFS doesn't boot), I understand that it's strange.
Populating /dev with device nodes
[ 4.7497771] modprobe used greatest stack depth: 6044 bytes left
[ 5.1244071] mkdir used greatest stack depth: 6024 bytes left [ ok]
Activating all swap files/partitions
swapon: /dev/sda3: stat failed: No such file or directory [ Fail ]
Mounting root file system in read-only mode [ ok ]
Checking file systems
fsck.ext3 No such file or directory while trying to open /dev/sda2
/dev/sda2:
The sperblock could not be read or dose not describe a correct ext2
file system. If the device is valid and it really contains an ext2
file system (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternative superblock:
e2fsck -b 8193 <device>
FAILURE ... ... ...
Here, the grub.cfg (he is correct I think)
Quote:
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by /usr/sbin/grub-mkconfig using templates
# from /usr/etc/grub.d and settings from /usr/etc/default/grub
#
### BEGIN /usr/etc/grub.d/00_header ###
set default=0
set timeout=5
### END /usr/etc/grub.d/00_header ###
### BEGIN /usr/etc/grub.d/10_linux ###
menuentry "GNU/Linux, with Linux 2.6.32.8-lfs-6.6" {
insmod ext2
set root=(hd0,2)
search --no-floppy --fs-uuid --set d7ba99c5-dfb2-473e-99f2-2a2a1d7131c5
linux /boot/vmlinux-2.6.32.8-lfs-6.6 root=/dev/sda2 ro
}
menuentry "GNU/Linux, with Linux 2.6.32.8-lfs-6.6 (recovery mode)" {
insmod ext2
set root=(hd0,2)
search --no-floppy --fs-uuid --set d7ba99c5-dfb2-473e-99f2-2a2a1d7131c5
linux /boot/vmlinux-2.6.32.8-lfs-6.6 root=/dev/sda2 ro single
}
### END /usr/etc/grub.d/10_linux ###
### BEGIN /usr/etc/grub.d/30_os-prober ###
### END /usr/etc/grub.d/30_os-prober ###
### BEGIN /usr/etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.
### END /usr/etc/grub.d/40_custom ###
To summarize:
I have one SCSI hard drive:
- /dev/sda1 -> the root partition of my host
- /dev/sda2 -> the root partition of my LFS
- /dev/sda3 -> my swap partition
After the configuration, the make, the make modules_install of the kernel and the differents copy in /boot I install the grub:
- grub-install --grub-setup=/bin/true /dev/sda, here the output:
Quote:
root:/sources/linux-2.6.32.8# grub-install --grub-setup=/bin/true /dev/sda
Installation finished. No error reported.
This is the contents of the device map /boot/grub/device.map.
Check if this is correct or not. If any of the lines is incorrect,
fix it and re-run the script `grub-install'.
(fd0) /dev/fd0
(hd0) /dev/sda
and grub-mkconfig -o /boot/grub/grub.cfg:
Quote:
root:/sources/linux-2.6.32.8# grub-mkconfig -o /boot/grub/grub.cfg
Generating grub.cfg ...
Found linux image: /boot/vmlinux-2.6.32.8-lfs-6.6
done
To finish I made grub-setup '(hd0)'.
Then, logout, umount the file system and restart. But I have alwase the same problem.
Looking at /etc/fstab you posted in post #9 I do not see anything out of the ordinary.
Your /boot/grub/grub.cfg file looks ok in regard to LFS. I do wonder why your host (/dev/sda1 - (hd0,1) ) isn't picked up and present, but I'm fairly sure that this is not causing the problem you are having.
A few questions:
- How do you boot into your host (debian)? If grub was set up correctly during the LFS build it would have overwritten the grub entry (MBR) that was present to boot debian and booting debian should not work any more.
- You mention the following in post #5: I set the module to yes in Device Drivers -> Serial ATA... That is a bit vague and it looks like you only set the main option and none of the sub options. There are a lot of options to choose from once you enter the Serial ATA section....
- If you are able to boot into your debian host can you post the output of the following commands: lspci and dmesg | egrep -i "scsi|[bps ]ata"
There is one other thing that comes to mind: You mention using VMWare in post #1. I'm definitely not a virtual machine expert, but are you sure its configuration is ok?
I can start on my host because before to instal the grub, I took a snapshot of my virtual machine.
Like this, if I have an problem after the grub installation, I can return to the situation before the
grub installation.
With respect to the module Device Drivers -> Serial ATA..., I selected all submenu.
I don't think there are something special to configure in my virtual machine.
Check to see if the appropriate options are set in the kernel: Device Drivers -> SCSI device support -> SCSI disk support + SCSI generic support + SCSI low-level drivers
and Device Drivers -> SCSI device support -> SCSI low-level drivers -> BusLogic SCSI support
You should also check your kernel options to see if the appropriate options are set for the entries shown by the lspci output. A lot of them are part of the Device Drivers section. If you are unsure about an option check the help section (sometimes a setting is suggested, go with that), if that doesn't help: Just ask here.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.