I am currently using Ubuntu 11.10. I have just finished my first Linux From Scratch build, and now I am trying to make it bootable. My system currently has Grub2 installed. I am trying to figure out how to add an entry for Linux from Scratch to Grub2. The partitions I am using are /dev/sd5 (the root partition), /dev/sda6 (the boot partition), /dev/sda7 (the home partition), and /dev/sda8 (the swap partition). Does anyone know how to do this?

-Aaron

spiky0011

12-30-2011 05:30 PM

Hi

The 1st thing can you post your /etc/fstab file and grub.cfg also the output of

Code:

sudo fdisk -l

.
It also depends on how you want to boot the system, mine is kept seperate from ubuntu

# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc nodev,noexec,nosuid 0 0
# / was on /dev/sda1 during installation
UUID=2b04dc66-c2b2-4e25-ac01-5a3936372264 / ext4 errors=remount-ro 0 1
# swap was on /dev/sda8 during installation
UUID=6067c5ee-0a8e-4c79-ad79-fd9743808f1f none swap sw 0 0

You would obviously need to change the "linux" line to fit your system and make sure that root is set correctly.

Then

Code:

sudo update-grub

ubuntudude12

12-30-2011 08:22 PM

I tried your suggestion, modifying the linux line to the proper settings for my system. When I try to boot using Grub2, I receive an error saying that the disk was not found, Do you know what could cause this?

-Aaron

Roken

12-30-2011 09:02 PM

It may be your set root= line - double and triple check that. There can also be problems if you built the kernel incorrectly. Does it get so far into the boot before it bombs, and if so what is the actual text of the error produced?

spiky0011

12-31-2011 01:08 AM

Post your grub.cfg how you set it up this time, and the error message you get

druuna

12-31-2011 02:31 AM

Hi,

Am I assuming correctly that you are using the grub that came with Ubuntu and not the one mewntioned/build/configured in LFS?

With that assumption in mind: Doesn't running a grub-update from Ubuntu find the new LFS system?

One of my other systems runs Debian (very related to Ubuntu) and running grub-update does find other OS's installed. On Debian this is the way to do it. If you manually add entries to grub (grub.cfg to be exact) they might be removed when the grub package is updated.