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.
I'M trying to work my way through the linux from scratch project and I'M on page http://www.linuxfromscratch.org/lfs/...er08/grub.html I've really messed up my boot up process. I did make a boot disk as descriped in the above link.The computer originally had Debian (CLI only) has the host system from which I was building my Linux from scratch system. Now when I turn on the computer it has one OS in the list that's labeled "GRUB Linux...........", when I click enter the screen goes black and says "Press any key to continue", then goes back to the boot loader with "GRUB Linux...........". If I boot the system with the book disk it's just a prompt that says GRUB. Can anyone tell me how to repair my Debian bootloader from my current state? Thanks.
A good place to start, load a live cd, then post the output of
Code:
sudo fdisk -l
and
Code:
sudo blkid
Also the /boot/grub/grub.cfg from host and grub.cfg fom lfs.
I,m not saying I can help but it will be good info to get help from others.
Think that should be enough for now.
One thing you can try right now is to manually boot the Debian system from that boot disk's grub> prompt. Debian has been using GRUB 2 for a long time, so I guess your Debian system has a core.img file. You might be able to manually boot it like this rough example (that will need considerable customizing by you)...
Code:
grub> linux (hdx,y)/boot/grub/core.img
grub> boot
First, you need to change x & y to the drive & partition with the Debian boot files. Use GRUB 2 enumeration for those since the boot disk is GRUB 2.
Next, if your Debian system has a separate boot partition, then omit the "/boot" part of the path in the linux command.
Next, the core.img file may be in a folder named differently. Generically, it usually has been in /boot/grub. But in Fedora as an example, it is now in /boot/grub2/i386-pc. It may be something else again in Debian (I don't use Debian at the moment). Change that part of the path when you know where it is in the Debian system.
When that linux command line is adjusted perfectly, enter the boot command and see if it boots Debian. If it does, then repair the Debian GRUB boot loader with the usual grub-install command in the running Debian system.
If all that worked, it should at least put you back to where you were before. Then continue on with what you want to do next.
P.S.: Just FYI, the Super Grub 2 Disk is a free and popular utility for emergency booting a Linux system with a busted GRUB 2 boot loader. It won't repair the boot loader like the old legacy Super Grub Disk did. But that doesn't really matter much if it boots the system. The boot loader is easy to repair after the system is running..
.
.
A good place to start, load a live cd, then post the output of
Code:
sudo fdisk -l
and
Code:
sudo blkid
Also the /boot/grub/grub.cfg from host and grub.cfg fom lfs.
I,m not saying I can help but it will be good info to get help from others.
Think that should be enough for now.
Disk /dev/sda: 250.1 GB, 2500059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sectors size (logical/physical): 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifiers: 0x00006aec
sudo fdisk -l
Device Boot Start End Blocks Id System
/sda1 1 26747 214842368 83 Linux
/sda2 26747 26869 976896 82 Linux swap / Solaris
/sda3 * 26869 30402 28378112 83 Linux
There is no /grub/grub.cfg on my debian system, I found a few other grub files I'll try and get on here later, I can't copy and past because it's two different machiens. Thanks.
A good place to start, load a live cd, then post the output of
Code:
sudo fdisk -l
and
Code:
sudo blkid
Also the /boot/grub/grub.cfg from host and grub.cfg fom lfs.
I,m not saying I can help but it will be good info to get help from others.
Think that should be enough for now.
# Begin /boot/grub/grub.cfg
set default=0
set timeout=5
insmod ext2
set root=(hd0,2)
menuentry "GNU/Linux, Linux 3.2.6-lfs-71"
{
linux /boot/vmlinuz-3.2.6-lfs-7.1 root=/dev/sda1 ro
}
So there is only 1 os system on this pc? "lfs"
Try changing to
No, there are two, a Debian and the LFS system. LFS is on sda1 and I think Debian is on sda3. I was trying to repair the Debian boot system or at leat configure the LFS boot system from a live CD. The live CD was working fine yesterday but now the screen just goes black and the moniture shows no activity after selectin "LIVE" from the debian Live CD. Any thoughts? Could you please explain the syntax of (hd0,2)?
Did you just copy the commands in the book I see you used scripts to build.
hd0 is the numbering of the harddrive ,2 the two is the partitions on the drive,
Hope that clears that bit.
So where did you build lfs? sda2 is swap.
I dont use Debain but google says /boot/grub/grub.cfg
I take it you boot and get a screen similar.
I dont know why the live cd wont boot nothing should stop that.
Lfs requirements state that you must have a running system along with build tools to install LFS to another partition,so I find it hard to believe that LFS is on sda1 unless you partitioned the drive to have the 3 partitions then installed debian to sda3.
I would say that debian is on sda1. & you'll need to reinstall grub.
Lfs requirements state that you must have a running system along with build tools to install LFS to another partition,so I find it hard to believe that LFS is on sda1 unless you partitioned the drive to have the 3 partitions then installed debian to sda3.
I would say that debian is on sda1. & you'll need to reinstall grub.
Your first guess is right, I have Debian installed on sda3. The LFS partitoin is on sda1.
Yes. I am able to boot the computer now using a boot disk that one of you guys on here suggested. I've also think I've fixed the LFS GRUB anyway but it still will not boot that I don't think it's a grub problem anymore. I've been told I have a Kernel driver problem. Does anyone know where I can find some sort of log created when installed and or configureing the kernel?
Just a little note when you post if you can show the errors or any relevent msgs you are getting it will help.
What errors are you getting. when you boot from grub.
The config log from the kernel is in /boot config-3.2
2.033750] VFS : Unable to mount root fs via NFS, trying floppy
2.034037] VFS : Cannot open root device "sda2" or unknown-black(2,0)
2.034109] Please append a correct "root=" boot option ; here are the available partitions:
2.034209] Kernel panic - not syncing: VFS : Unable to mount root fs on unknown -block(2,0)
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.