LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux From Scratch (https://www.linuxquestions.org/questions/linux-from-scratch-13/)
-   -   Linux From Scratch 8.4 - Grub Issues (https://www.linuxquestions.org/questions/linux-from-scratch-13/linux-from-scratch-8-4-grub-issues-4175515139/)

ReaperX7 08-17-2014 01:04 AM

How exactly did you install your Grub configuration?

Skorpius7 08-17-2014 08:42 AM

Quote:

Originally Posted by ReaperX7 (Post 5222348)
How exactly did you install your Grub configuration?

That's the issue I'm facing - SalixOS comes with LILO boot instead of Grub, so I don't think grub is even on my system to begin with. I don't have grub listed under my boot folders...

EDIT: Scratch that - I did ./config in the grub source folder and when I wen to boot...

Code:

root:/boot# cd grub/
root:/boot/grub# ls
i386-pc  locale

But I still get the same error as before

Skorpius7 08-17-2014 09:51 AM

Code:

`/boot/grub' is not readable by GRUB on boot. Installation is impossible. Aborting.
So for the past month or so, I've been trying to build LFS through Virtualbox and the old LiveCD they had. After trouble in Chapter 6, I decided to try it out on an actual harddrive, running SalixOS and LFS has been a breeze since. After 2 days of speedily catching up and getting ahead, I've made it to Chapter 8, where the boot stuff occurs (GRUB), but now I have ran into this error. FIrst of all, I am under the impressiont hat this section is optional and I can just edit the current grub loader I have (booting Salix) to load my LFS build instead. Is this true? Anyway, I was wondering if there were any ideas where this error could be coming from? I was digging around a bit and it seems like this error usually results from forgetting to mount certain things. I've assured that everything is mounted (as in chapter 6.2 and 6.2.3) and I am doing this through chroot.

I also tried to ./configure inside the grub source directory and then;

Code:

root:/boot# cd grub/
root:/boot/grub# ls
i386-pc  locale

But still got the same error.

Then I tried to boot with USB according to the instructions on this post (digging through LQ):

Quote:

I skipped this chapter (no grub on mbr) and i boot from usb.. you can use this way if you want:
http://www.supergrubdisk.org/put-sup...-from-windows/

At boot choose "Detect any grub2 configuration file (grub.cfg)" option.

# Begin /boot/grub/grub.cfg
set default=0
set timeout=5

insmod ext2
set root=(hd1,2)

menuentry "GNU/Linux, Linux 3.13.3-lfs-7.5" {
linux /boot/vmlinuz-3.13.3-lfs-7.5 root=/dev/sda2 ro
}
And it recognized both LFS and Salix..but it couldn't successfully boot either of them - just stood still

yancek 08-17-2014 04:04 PM

Quote:

root:/boot/grub# ls
i386-pc locale
On the systems I have with grub2, I see at least a grub.cfg file also in that directory.
Also, in each menuentry there should be a separate set root= line. The set root line you posted "set root=(hd1,2)" is sdb2 while on the linux line you have the root=/dev/sda2. I'm really not sure what you are doing here. If you are not able to figure this out, you might do a google for 'bootinfoscript', download and run it from an Linux and post the output here for help. It should output a file called results.txt.

ReaperX7 08-17-2014 09:02 PM

You shouldn't need a Live Disk to boot LFS.

Properly done this is how you install Grub's configuration:

If your virtual hard drive is labeled as /dev/sda, this is what you will do in chroot...

Code:

mkdir -pv /boot/grub
grub-mkconfig -o /boot/grub/grub.cfg
grub-install /dev/sda

The only error Grub should spit out normally is the lack of a /etc/default/grub configuration file script.

EDDY1 08-18-2014 12:00 AM

Is Salix still bootable?
Is Salix using grub or lilo?

EDDY1 08-18-2014 12:07 AM

Also after reviewing your grub entry I would assume that your entry for lfs is incorrect
Quote:

menuentry "GNU/Linux, Linux 3.13.3-lfs-7.5" {
linux /boot/vmlinuz-3.13.3-lfs-7.5 root=/dev/sda2 ro
I doubt that it would be /dev/sda2 if you can post output of
Quote:

cat/etc/fstab
&
Quote:

fdisk -l
We will be able to help with your grub/lilo.

oblo 08-24-2014 07:02 AM

I also use usb to boot.. but i'm using uuid, without i had big problems (use "blkid" to look).

# Begin /boot/grub/grub.cfg
set default=0
set timeout=5

insmod ext2
set root=(hd1,2)

menuentry "GNU/Linux, Linux 3.13.3-lfs-7.5" {
linux /boot/vmlinuz-3.13.3-lfs-7.5 root=/dev/sda2 ro
}



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


# Begin /etc/fstab
# file system mount-point type options dump fsck
# order

UUID=ca428dd5-b5ed-4f84-8fd9-420a45298d38 / ext4 defaults 1 1
UUID=bda17fe3-6125-4ad5-9313-69b248828fb3 swap swap pri=1 0 0
UUID=3433-3231 /mnt/penna_usb vfat nosuid,noexec,nodev 0 0
proc /proc proc nosuid,noexec,nodev 0 0
sysfs /sys sysfs nosuid,noexec,nodev 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
tmpfs /run tmpfs defaults 0 0
devtmpfs /dev devtmpfs mode=0755,nosuid 0 0
/dev/sr0 /mnt/cdrom iso9660 ro,noauto,user 0 0

# End /etc/fstab


All times are GMT -5. The time now is 05:42 AM.