LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch
User Name
Password
Linux From Scratch This 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


Reply
  Search this Thread
Old 12-19-2012, 01:42 PM   #1
princezidane
LQ Newbie
 
Registered: Dec 2012
Posts: 14

Rep: Reputation: Disabled
8.4. Using GRUB to Set Up the Boot Process Problem please help me !!!


8.4.1. Introduction
When I use this command :
Quote:
root:/sources# cd /tmp &&
> grub-mkrescue --output=grub-img.iso &&
> xorriso -as cdrecord -v dev=/dev/cdrw blank=as_needed grub-img.iso
Output is:
Quote:
Enabling BIOS support ...
/usr/bin/grub-mkrescue: line 371: xorriso: command not found
8.4.2. GRUB Naming Conventions
When I use this command :
Quote:
root:/tmp# grub-mkdevicemap --device-map=device.map
Output is:
Quote:
bash: grub-mkdevicemap: command not found
When I use this command:
Quote:
root:/tmp# cat device.map
Output is:
Quote:
cat: device.map: No such file or directory
8.4.3. Setting Up the Configuration
Partition that i build LFS is sdb1 type3. What grub.cfc should be?

Thank you for any help!!!
Please help me
 
Old 12-19-2012, 03:51 PM   #2
stoat
Member
 
Registered: May 2007
Distribution: LFS
Posts: 628

Rep: Reputation: 185Reputation: 185
For the 8.4.1 question... The grub-mkrescue command depends upon xorriso. Xorriso is not part of LFS, so it has to be installed sort of as a side-project, so-to-speak. Xorriso is in the BLFS book. All of this is stated in 8.4.1. Section 8.4.1 merely creates an emergency boot disk (which everyone should possess anyway) in case you bust your host system's boot loader doing chapter 8. So either install xorriso and create the boot disk according to 8.4.1, or download and burn a Super GRUB 2 Disk (a free and popular emergency boot disk). I recommend against proceeding without possessing (and knowing how to use) a boot disk if you intend to do the grub-install step in chapter 8 (otherwise, it's not too risky to proceed without a boot disk at this time IMO).

For the 8.4.2 question... That stuff is no longer valid. See the LFS 7.2 errata. So you have to skip that. I would just try (hd1,1) in the grub.cfg for /dev/sdb1. It might just work, and it sure won't hurt anything to try.

For the 8.4.3 question... I would use the example in the book and change the set root= command to (hd1,1) and the root= kernel parameter to /dev/sdb1.

My recommendation is NOT to do the grub-install step in chapter 8 at this time. It will replace your host system's boot loader with LFS's which you don't know is even going to boot yet. I would skip the grub-install step for now, create the grub.cfg file, and take the necessary steps to add the LFS system to the boot menu of the host system's boot loader and boot it from there.

Last edited by stoat; 12-19-2012 at 04:08 PM.
 
Old 12-20-2012, 01:24 AM   #3
princezidane
LQ Newbie
 
Registered: Dec 2012
Posts: 14

Original Poster
Rep: Reputation: Disabled
When I skip 8.1 and 8.2 from you suggestion.

When I done everything until 9.3 after i reboot my system i got this error

http://image.free.in.th/z/iv/jlq11.jpg


Please help me !!!

I dont want start to build LFS from the first pages of the tutorial again....
Attached Thumbnails
Click image for larger version

Name:	1.jpg
Views:	84
Size:	162.3 KB
ID:	11436  

Last edited by princezidane; 12-20-2012 at 01:26 AM.
 
Old 12-20-2012, 01:37 AM   #4
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Quote:
Originally Posted by princezidane View Post
When I skip 8.1 and 8.2 from you suggestion.
I do believe stoat said you should skip 8.4 and not 8.1 and 8.2 (8.3?).

8.2 and 8.3 are essential!

Instead of doing 8.4 you need to tell your host to look for new grub entries by executing (from your host, as root):
Code:
update-grub
The above should find the LFS entry and add it.
 
Old 12-20-2012, 01:44 AM   #5
princezidane
LQ Newbie
 
Registered: Dec 2012
Posts: 14

Original Poster
Rep: Reputation: Disabled
Sorry for misunderstand i skip 8.4.1 and 8.4.2 from Stoat advice.
 
Old 12-20-2012, 01:56 AM   #6
princezidane
LQ Newbie
 
Registered: Dec 2012
Posts: 14

Original Poster
Rep: Reputation: Disabled
When I try Druuna suggestion i got the same error.

What is "VFS Cannot open root device 'sdb1' or unknow-block(0,0)" mean?

and How to fix it?

Anyway my grub.cfg is

Quote:
cat > /boot/grub/grub.cfg << "EOF"
# Begin /boot/grub/grub.cfg
set default=0
set timeout=5

insmod ext3
set root=(hd1,1)

menuentry "GNU/Linux, Linux 3.5.2-lfs-7.2" {
linux /boot/vmlinuz-3.5.2-lfs-7.2 root=/dev/sdb1 ro
}
EOF
I build LFS in sdb1 and type of Hdd is ext3. Is this a collect script of grup.cfg for my LFS?
 
Old 12-20-2012, 01:58 AM   #7
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
If your problem still remains after you did what I suggested in post #4, please post the following information:

From your host:
- lfs related part from your grub.conf,
- output of fdisk -l /dev/sdb (and point out which partition is used for LFS/swap/??)

From LFS:
- inittab
- fstab

EDIT: Some info was posted while I replied...
 
Old 12-20-2012, 02:21 AM   #8
princezidane
LQ Newbie
 
Registered: Dec 2012
Posts: 14

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by druuna View Post
If your problem still remains after you did what I suggested in post #4, please post the following information:

From your host:
- lfs related part from your grub.conf,
- output of fdisk -l /dev/sdb (and point out which partition is used for LFS/swap/??)

From LFS:
- inittab
- fstab

EDIT: Some info was posted while I replied...
If your problem still remains after you did what I suggested in post #4, please post the following information:

From your host:
- lfs related part from your grub.conf,
Quote:
I dont know what is this mean ? sorry.
- output of fdisk -l /dev/sdb (and point out which partition is used for LFS/swap/??)
Quote:
Device Boot Start End Blocks Id System
/dev/sdb1 2048 27265023 13631488 83 Linux
/dev/sdb2 27265024 31457279 2096128 82 Linux swap / Solaris
Quote:
I do all above from LFS not my host because when I write command inittab and fstab in LFS It tell me command not found!!
From LFS:
- inittab
- fstab
Quote:
Both command tell me "command not found" from Both my host and LFS

EDIT: Some info was posted while I replied...

Step I do after 8.2

1.
Quote:
grub-install /dev/sda
2.
Quote:
cat > /boot/grub/grub.cfg << "EOF"
# Begin /boot/grub/grub.cfg
set default=0
set timeout=5

insmod ext3
set root=(hd1,1)

menuentry "GNU/Linux, Linux 3.5.2-lfs-7.2" {
linux /boot/vmlinuz-3.5.2-lfs-7.2 root=/dev/sdb1 ro
}
EOF
3. do until finish 9.2

4.
Quote:
logout
5.
Quote:
update-grub
from your advice

6.
Quote:
umount -v $LFS/dev/pts
umount -v $LFS/dev/shm
umount -v $LFS/dev
umount -v $LFS/proc
umount -v $LFS/sys
umount -v $LFS/usr
umount -v $LFS/home
umount -v $LFS
8.
Quote:
shutdown -r now

Last edited by princezidane; 12-20-2012 at 02:36 AM.
 
Old 12-20-2012, 02:47 AM   #9
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Please follow the instructions we posted! If anything is unclear DO NOT just execute commands.

You are still executing commands from 8.4: Do not do any steps from chapter 8.4!!! There is no point in doing these steps if your hosts grub is used. To emphasize: None of the steps from 8.4 should be done. Skip that chapter.

You might have just overwritten your hosts boot loader by executing grub-install /dev/sda........ I'm not sure if the following will work.

As stated in post #4: You need to run the following command from your host as root:
Code:
update-grub
When that command finishes, post the lfs related part from /boot/grub/grub.cfg (on your host!).

inittab and fstab aren't commands but configuration files...........
From LFS post the content of those files!

Make sure you understand what is being done, if you don't you will probably mess up your LFS build and possibly your host.
 
Old 12-20-2012, 02:54 AM   #10
EDDY1
LQ Addict
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 6,841

Rep: Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649
What operating system are you using?
Quote:
From LFS:
- inittab
- fstab
Quote:
Quote:
Both command tell me "command not found" from Both my host and LFS
You can try
Quote:
cat /etc/fstab
cat /etc/inittab
 
Old 12-20-2012, 03:06 AM   #11
princezidane
LQ Newbie
 
Registered: Dec 2012
Posts: 14

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by druuna View Post
Please follow the instructions we posted! If anything is unclear DO NOT just execute commands.

You are still executing commands from 8.4: Do not do any steps from chapter 8.4!!! There is no point in doing these steps if your hosts grub is used. To emphasize: None of the steps from 8.4 should be done. Skip that chapter.

You might have just overwritten your hosts boot loader by executing grub-install /dev/sda........ I'm not sure if the following will work.

As stated in post #4: You need to run the following command from your host as root:
Code:
update-grub
When that command finishes, post the lfs related part from /boot/grub/grub.cfg (on your host!).

inittab and fstab aren't commands but configuration files...........
From LFS post the content of those files!

Make sure you understand what is being done, if you don't you will probably mess up your LFS build and possibly your host.
Sorry I am very new for linux and LFS, and Im oversea student so Language is a little problem when i try to study this.
Some chapter i understand and Some i'm not.

1.my inittab

Quote:
# Begin /etc/inittab

id:3:initdefault:

si::sysinit:/etc/rc.d/init.d/rc S

l0:0:wait:/etc/rc.d/init.d/rc 0
l1:S1:wait:/etc/rc.d/init.d/rc 1
l2:2:wait:/etc/rc.d/init.d/rc 2
l3:3:wait:/etc/rc.d/init.d/rc 3
l4:4:wait:/etc/rc.d/init.d/rc 4
l5:5:wait:/etc/rc.d/init.d/rc 5
l6:6:wait:/etc/rc.d/init.d/rc 6

ca:12345:ctrlaltdel:/sbin/shutdown -t1 -a -r now

su:S016nce:/sbin/sulogin

1:2345:respawn:/sbin/agetty --noclear tty1 9600
2:2345:respawn:/sbin/agetty tty2 9600
3:2345:respawn:/sbin/agetty tty3 9600
4:2345:respawn:/sbin/agetty tty4 9600
5:2345:respawn:/sbin/agetty tty5 9600
6:2345:respawn:/sbin/agetty tty6 9600

# End /etc/inittab
2.fstab

Quote:
# Begin /etc/fstab
# file system mount-point type options dump fsck
# order
/dev/sdb1 / ext3 defaults 1 1
/dev/sdb2 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=5,mode=620 0 0
tmpfs /run tmpfs defaults 0 0
devtmpfs /dev devtmpfs mode=0755,nosuid 0 0

# End /etc/fstab
3. When i use update-grub command from my root system.
This is output:
Quote:
root@princezidane-virtual-machine:/mnt/lfs# update-grub
Generating grub.cfg ...
Found linux image: /boot/vmlinuz-3.2.0-29-generic-pae
Found initrd image: /boot/initrd.img-3.2.0-29-generic-pae
Found memtest86+ image: /boot/memtest86+.bin
Found Linux From Scratch (7.2) on /dev/sdb1
done
when i use command whereis grub.cfg
output is:
Quote:
grub: /etc/grub.d /usr/lib/grub /usr/share/grub

4.If i dont use command grub-install /dev/sda
When i finished 9.3 Reboot the System, It not boot LFS but it boot my distribution (Ubuntu).

Last edited by princezidane; 12-20-2012 at 03:14 AM.
 
Old 12-20-2012, 03:19 AM   #12
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Quote:
Originally Posted by princezidane View Post
Sorry I am very new for linux and LFS, and Im oversea student so Language is a little problem when i try to study this.
Some chapter i understand and Some i'm not.
Language can be a problem, but a basic understanding of Linux is assumed (vi. Prerequisites). I doubt if your basic Linux knowledge is sufficient.

Quote:
1.my inittab
This looks OK.

Quote:
2.fstab
This also looks OK.

Quote:
3. When i use update-grub command from my root system.
This is output:
Quote:
root@princezidane-virtual-machine:/mnt/lfs# update-grub
Generating grub.cfg ...
Found linux image: /boot/vmlinuz-3.2.0-29-generic-pae
Found initrd image: /boot/initrd.img-3.2.0-29-generic-pae
Found memtest86+ image: /boot/memtest86+.bin
Found Linux From Scratch (7.2) on /dev/sdb1
done
That also looks OK, a LFS entry is found (the bold part).

Quote:
4.If i dont use command grub-install /dev/sda
When i finished 9.3 Reboot the System, It not boot LFS but it boot my distribution (Ubuntu).
Like I said before: Forget about the grub-install /dev/sdX command.

When you boot you get a menu with several options, one of those is LFS. Select it (arrow down/up) and press enter.
 
Old 12-20-2012, 03:40 AM   #13
princezidane
LQ Newbie
 
Registered: Dec 2012
Posts: 14

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by druuna View Post
Language can be a problem, but a basic understanding of Linux is assumed (vi. Prerequisites). I doubt if your basic Linux knowledge is sufficient.

This looks OK.

This also looks OK.

That also looks OK, a LFS entry is found (the bold part).

Like I said before: Forget about the grub-install /dev/sdX command.

When you boot you get a menu with several options, one of those is LFS. Select it (arrow down/up) and press enter.
I do following step from your advice.
1. skip 8.3 and do until 9.3

2. When after i restart it has several boot section as you say , but when i choose boot from LFS 7.2 it has the same error .
This photo show a error.

3. Anyway i forgot tell you i skip 7.10 before those step.
Is it make a error to my LFS?
Attached Thumbnails
Click image for larger version

Name:	1.jpg
Views:	26
Size:	177.7 KB
ID:	11437  
 
Old 12-20-2012, 03:58 AM   #14
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Quote:
Originally Posted by princezidane View Post
I do following step from your advice.
1. skip 8.3 and do until 9.3
Sigh......
Who told you to skip 8.3?

Do chapter 8.3, its about your kernel which is rather important. Without it you create all sorts of problems. Fix this first.

Quote:
3. Anyway i forgot tell you i skip 7.10 before those step.
Is it make a error to my LFS?
You can skip 7.10 (Configuring the Linux Console) if you want/need to. It isn't the cause of your error.
 
Old 12-20-2012, 04:05 AM   #15
princezidane
LQ Newbie
 
Registered: Dec 2012
Posts: 14

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by druuna View Post
Sigh......
Who told you to skip 8.3?

Do chapter 8.3, its about your kernel which is rather important. Without it you create all sorts of problems. Fix this first.

You can skip 7.10 (Configuring the Linux Console) if you want/need to. It isn't the cause of your error.
sorry i tell you wrong i skip8.4.
What cause of this problem?
To resolve this problem what is chapter that I should to start from it again?(I use vmware and i snapshot when I finished each chapter )

Anyway in chapter 8.2 i skip

Quote:
hdparm -I /dev/sda | grep NCQ
my lfs is in sdb2 type 3.

Can I skip this step or not?

Last edited by princezidane; 12-20-2012 at 04:11 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Setting up the boot process problem using GRUB on an LFS system! linuxpicaxe Linux From Scratch 1 03-07-2011 04:12 AM
does grub (or similar) slow down boot process? angelo_maci Linux - Newbie 7 10-30-2010 04:05 PM
8.4. Using GRUB to Set Up the Boot Process exvor Linux From Scratch 1 06-10-2010 06:44 PM
How can I set echo off during boot process in Grub for openSUSE? Romanator SUSE / openSUSE 2 05-19-2008 12:24 PM
How to set Grub not to auto boot any OS without Grub Boot menu shown ussr_1991 Linux - Software 2 09-01-2007 08:36 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch

All times are GMT -5. The time now is 10:30 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration