LinuxQuestions.org
Visit Jeremy's Blog.
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 11-30-2014, 06:39 AM   #1
sholizar
LQ Newbie
 
Registered: Sep 2014
Posts: 28

Rep: Reputation: Disabled
i cant boot into new LFS installation (lfs 7.5)


i just now finished to install LFS(first time).
my host system is archlinux.
i didn't install grub as described in the sections 8.4.3-4 here: http://goo.gl/Hu7dSe.
i already have grub installed in my archlinux installation drive.
so, i went to arch linux wiki about grub to see how to add another grub menu.
i get into this article: https://wiki.archlinux.org/index.php/GRUB#Dual-booting

it says that for adding another grub menu, i need to edit the file '/etc/grub.d/40_custom', and add to it the menu entry of my LFS system, which is:

insmod ext2
set root=(hd0,5)
menuentry "GNU/Linux, Linux 3.13.3-lfs-7.5" {
linux /boot/vmlinuz-3.13.3-lfs-7.5 root=/dev/sda5 ro
}


if i run lsblk, i see that the drive of LFS is sda5, so the details in this menu entry are correct as i understand .

after adding this information to the file, i need to run the command:
grub-mkconfig -o /boot/grub/grub.cfg

to update the grub.cfg file to include my LFS system.

then i reboot my computer and get as usual to my grub menu.
the grub now have the new LFS entry!
but, if i chose this entry, i get error:

error: file `/boot/vmlinuz-3.13.3-lfs-7.5' not found


i boot into archlinux again, chroot to the LFS system, and checked if i have the file: '/boot/vmlinuz-3.13.3-lfs-7.5'

and yes, it's there!

so how can i overcome this problem?

thanks!

Last edited by sholizar; 11-30-2014 at 07:09 PM.
 
Old 11-30-2014, 10:17 AM   #2
spiky0011
Senior Member
 
Registered: Jan 2011
Location: PLANET-SPIKE
Distribution: /LFS/Debian
Posts: 2,511
Blog Entries: 1

Rep: Reputation: 412Reputation: 412Reputation: 412Reputation: 412Reputation: 412
Hi

When you get to grub select the lfs option press "e" that will give you a command line which is editable, Just check that it is pointing to where lfs is as per what you put in grub, if not you can edit if needed. And as long as you are sure thats where LFS was installed.
 
Old 11-30-2014, 10:43 AM   #3
sholizar
LQ Newbie
 
Registered: Sep 2014
Posts: 28

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by spiky0011 View Post
Hi

When you get to grub select the lfs option press "e" that will give you a command line which is editable, Just check that it is pointing to where lfs is as per what you put in grub, if not you can edit if needed. And as long as you are sure thats where LFS was installed.
did it now.
i see /dev/sda5 like it should be, so it seems to be good as far as i understand.
i have just 2 more linux partitions.
one for swap and another one for arch.
arch is in /dev/sda3

Last edited by sholizar; 11-30-2014 at 10:45 AM.
 
1 members found this post helpful.
Old 11-30-2014, 10:47 AM   #4
sholizar
LQ Newbie
 
Registered: Sep 2014
Posts: 28

Original Poster
Rep: Reputation: Disabled
is there a problem that /dev/sda4 is extended partition?
 
Old 11-30-2014, 11:55 AM   #5
Teufel
Member
 
Registered: Apr 2012
Distribution: Gentoo
Posts: 616

Rep: Reputation: 142Reputation: 142
Quote:
Originally Posted by sholizar View Post
is there a problem that /dev/sda4 is extended partition?
No.
Try to point out grub by UUID instead of sdX.
Replace root=/dev/sda5 with root=UUID=<partition UUID here> or real_root=UUID=<partition UUID here>
 
Old 11-30-2014, 12:09 PM   #6
spiky0011
Senior Member
 
Registered: Jan 2011
Location: PLANET-SPIKE
Distribution: /LFS/Debian
Posts: 2,511
Blog Entries: 1

Rep: Reputation: 412Reputation: 412Reputation: 412Reputation: 412Reputation: 412
Lfs dosn't work with UUId.
No Extended partition wont affect it,

Quote:
insmod ext2
set root=(hd0,5)
menuentry "GNU/Linux, Linux 3.13.3-lfs-7.5" {
linux /boot/vmlinuz-3.13.3-lfs-7.5 root=/dev/sda5 ro
}
That all looks good as well.

You could create your own grub.cfg just save your old 1 1st then just create it like the book shows "with your settings"
 
Old 11-30-2014, 12:34 PM   #7
sholizar
LQ Newbie
 
Registered: Sep 2014
Posts: 28

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Teufel View Post
No.
Try to point out grub by UUID instead of sdX.
Replace root=/dev/sda5 with root=UUID=<partition UUID here> or real_root=UUID=<partition UUID here>
done that.
doesn't work

but! i thought about something and maybe this causing all the problem.
when installing LFS, the guide tell you to make this directory: /mnt/lfs
the guide also make an environment variable $LFS which contains /mnt/lfs
after that you mount the device(mine is /dev/sda5) to the direcory you maid(/mnt/lfs).
the command is(for my computer):
mount -v -t ext4 /dev/sda5 $LFS

now /dev/sda5 attached to /mnt/lfs

but! what happened after reboot?
if i understand correctly, after reboot this mounting disappear.
i made a lot of reboots, or shuting down the computer, in the process of installing LFS system, but i never (ever!) mount my device (/dev/sda5) to the right directory (/mnt/lfs) before continue the installation, so a lot of work done in a directory that did not attached to my lfs device(/dev/sda5) as it should be!

i think i have to delete my sda5 and start all over again, and this time, every time i shutdown my computer, or reboot it, run this command:
mount -v -t ext4 /dev/sda5 $LFS

if i am right, a lot of the compilations i made, and almost all the configurations i made, were done in a directory(/mnt/lfs) that belongs to my archlinux device, which is /dev/sda3 and not to my LFS device(/dev/sda5).

am i right in all of this?

i don't remember, but i think the LFS team(again, if i'm right in what i wrote before) didn't write anything about mounting the device every time after a fresh startup of the computer.
i think that they should write it now in the guide :-)
 
Old 11-30-2014, 12:48 PM   #8
spiky0011
Senior Member
 
Registered: Jan 2011
Location: PLANET-SPIKE
Distribution: /LFS/Debian
Posts: 2,511
Blog Entries: 1

Rep: Reputation: 412Reputation: 412Reputation: 412Reputation: 412Reputation: 412
Hi

Um yes there is a note at the bottom of Chapter 6.4
 
Old 11-30-2014, 12:58 PM   #9
Teufel
Member
 
Registered: Apr 2012
Distribution: Gentoo
Posts: 616

Rep: Reputation: 142Reputation: 142
Oops, I forgot LFS doesn't use initramfs...
I would not rush to start it from the beginning.
You can enter Grub shell and try to find where is your kernel located.
When Grub menu appeared (assuming it Grub2), press "c" key and you will be put into grub shell with "grub >" prompt.
Type "ls". It will show disks and partitions list.
Run this command for all partitions:
"ls (hd0,X)/boot"
it will list all the files in boot directory for each of hd0,X partitions.
Have your lfs kernel listed on "ls (hd0,5)/boot" command or no?
Or will be it found somewhere else (on other partition)?

Last edited by Teufel; 11-30-2014 at 01:03 PM.
 
Old 11-30-2014, 01:04 PM   #10
spiky0011
Senior Member
 
Registered: Jan 2011
Location: PLANET-SPIKE
Distribution: /LFS/Debian
Posts: 2,511
Blog Entries: 1

Rep: Reputation: 412Reputation: 412Reputation: 412Reputation: 412Reputation: 412
try mounting sda5 and have a look in the boot dir is another option also see if there ae dirs on the partition
 
Old 11-30-2014, 01:08 PM   #11
sholizar
LQ Newbie
 
Registered: Sep 2014
Posts: 28

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by spiky0011 View Post
Hi

Um yes there is a note at the bottom of Chapter 6.4
i know, but there isn't in chapters 4 and 5.
in 5 there are a lot of compiling :-).
 
Old 11-30-2014, 01:13 PM   #12
spiky0011
Senior Member
 
Registered: Jan 2011
Location: PLANET-SPIKE
Distribution: /LFS/Debian
Posts: 2,511
Blog Entries: 1

Rep: Reputation: 412Reputation: 412Reputation: 412Reputation: 412Reputation: 412
ok, mount sda5 cd into it see if there is anything there.

FYI I make an entry in fstab that mounts the lfs partition while I,m building
 
Old 11-30-2014, 01:23 PM   #13
sholizar
LQ Newbie
 
Registered: Sep 2014
Posts: 28

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by spiky0011 View Post
try mounting sda5 and have a look in the boot dir is another option also see if there ae dirs on the partition
well, there is not a boot dir there(in /dev/sda5) :-)
i made a directory /mnt/pashosh
then i mount /dev/sda5 /mnt/pashosh
then i go into /mnt/pashosh and there are there just those folders:

lost+found sources tools

all my work is in /mnt/lfs directory, but /mnt/lfs isn't mounted(for a long time) to /dev/sda5.

Last edited by sholizar; 11-30-2014 at 01:27 PM.
 
Old 11-30-2014, 01:25 PM   #14
spiky0011
Senior Member
 
Registered: Jan 2011
Location: PLANET-SPIKE
Distribution: /LFS/Debian
Posts: 2,511
Blog Entries: 1

Rep: Reputation: 412Reputation: 412Reputation: 412Reputation: 412Reputation: 412
O sorry

And you think you reboot during chapter5
 
Old 11-30-2014, 01:25 PM   #15
sholizar
LQ Newbie
 
Registered: Sep 2014
Posts: 28

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by spiky0011 View Post

FYI I make an entry in fstab that mounts the lfs partition while I,m building
yes i think this is a good thing after what i have found out now :-)

---------- Post added 11-30-14 at 11:26 PM ----------

Quote:
Originally Posted by spiky0011 View Post
O sorry

And you think you reboot during chapter5
of course i did :-).
 
  


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
Gcc 4.6.1 can't Find in /mnt/lfs/tools on LFS verison 7.0 using LFS_TGT xerofoify Linux From Scratch 20 08-03-2012 12:55 PM
[SOLVED] LFS 6.7 : $LFS/sources and $LFS/tools folders missing prakashsince92 Linux From Scratch 5 12-09-2010 02:26 PM
Can't boot LFS ( kernel panic - not syncing ) LFS 6.6 Lyle Linux From Scratch 14 05-15-2010 03:22 AM
LFS newbie stuck in Linux API headers step 5.5 LFS book 6.3 Vxplus Linux From Scratch 2 11-10-2008 08:13 PM

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

All times are GMT -5. The time now is 04:11 PM.

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