LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 10-28-2017, 10:30 AM   #16
hariskar
Member
 
Registered: Feb 2017
Distribution: Gentoo, Linux From Scratch
Posts: 53

Original Poster
Rep: Reputation: Disabled

With hd1,1 error: no such partition

Code:
$ ls /home/hk/sdc1
config-4.13.9-lfs-SVN-20171020  System.map-4.13.9-lfs-SVN-20171020
lost+found                      vmlinuz-4.13.9-lfs-SVN-20171020
 
Old 10-28-2017, 10:44 AM   #17
hariskar
Member
 
Registered: Feb 2017
Distribution: Gentoo, Linux From Scratch
Posts: 53

Original Poster
Rep: Reputation: Disabled
As I read in chapter 8.3:
If the host system has a separate /boot partition, the files copied below should go there. So, the LFS kernel files should be at gentoo /boot which is hd(0,5).
This way LFS booted. So, should I leave it this way?
 
Old 10-28-2017, 10:50 AM   #18
plasmonics
Member
 
Registered: Jan 2009
Distribution: Fedora, Gentoo, LFS
Posts: 224

Rep: Reputation: 69
In addition to what has been suggested, you need to add
Code:
/dev/sdc1     /boot   ext4   defaults     1   2
to LFS /etc/fstab.
You also need to make a directory called "/boot" in LFS, as this is your mount point.

Also, it is not a good idea to manually edit grub.cfg in gentoo. It will get overwritten every time gentoo updates grub. That is why I suggested putting the stanza in 40_custom.

Is there some special reason to have a separate boot partition in LFS? You could just copy vmlinuz to LFS /boot and use "set root=(hd2,2)"
 
1 members found this post helpful.
Old 10-28-2017, 10:53 AM   #19
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 you need to use the complete vmlinuz name vmlinuz-4.13.9-svn-20171020.
but thats not the partition error. And set root=(hd2,1) is correct if kernel is in sdc1
 
1 members found this post helpful.
Old 10-28-2017, 10:57 AM   #20
hariskar
Member
 
Registered: Feb 2017
Distribution: Gentoo, Linux From Scratch
Posts: 53

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by plasmonics View Post
In addition to what has been suggested, you need to add
Code:
/dev/sdc1     /boot   ext4   defaults     1   2
to LFS /etc/fstab.
You also need to make a directory called "/boot" in LFS, as this is your mount point.

Also, it is not a good idea to manually edit grub.cfg in gentoo. It will get overwritten every time gentoo updates grub. That is why I suggested putting the stanza in 40_custom.

Is there some special reason to have a separate boot partition in LFS? You could just copy vmlinuz to LFS /boot and use "set root=(hd2,2)"
I will make the additions to LFS /etc/fstab.
I already have /boot in LFS.

I agree and will add the code in 40_custom where I already have the code for Windows 10.
I seperated /boot in a dedicated partition because I read in chapter 2.4.1.4 that making a /boot partition is highly recommended : "/boot – Highly recommended. Use this partition to store kernels and other booting information."
Shouldn't I do it?




Quote:
Originally Posted by spiky0011 View Post
Ok you need to use the complete vmlinuz name vmlinuz-4.13.9-svn-20171020.
but thats not the partition error. And set root=(hd2,1) is correct if kernel is in sdc1

Yes, I have the whole name to distinguish from gentoo kernels.
So you think set root=(hd2,1) should work? If yes why does it not?

Last edited by hariskar; 10-28-2017 at 11:00 AM.
 
Old 10-28-2017, 11:12 AM   #21
plasmonics
Member
 
Registered: Jan 2009
Distribution: Fedora, Gentoo, LFS
Posts: 224

Rep: Reputation: 69
Quote:
Originally Posted by hariskar View Post
As I read in chapter 8.3:
If the host system has a separate /boot partition, the files copied below should go there. So, the LFS kernel files should be at gentoo /boot which is hd(0,5).
This way LFS booted. So, should I leave it this way?
So this explains why the OP's vmlinuz ended up in gentoo. When I was going through the book, I missed that particular caveat in ch 8.3. No wonder my vmlinuz ended up in the right place!
 
Old 10-28-2017, 11:14 AM   #22
hariskar
Member
 
Registered: Feb 2017
Distribution: Gentoo, Linux From Scratch
Posts: 53

Original Poster
Rep: Reputation: Disabled
Yes, but why your kernel works in the right place and mine does not? grub can even not recognise the partition...
 
Old 10-28-2017, 11:29 AM   #23
plasmonics
Member
 
Registered: Jan 2009
Distribution: Fedora, Gentoo, LFS
Posts: 224

Rep: Reputation: 69
Quote:
Originally Posted by hariskar View Post
I seperated /boot in a dedicated partition because I read in chapter 2.4.1.4 that making a /boot partition is highly recommended : "/boot – Highly recommended. Use this partition to store kernels and other booting information."
Shouldn't I do it?
In LFS, you can certainly have separate partitions mounted at /, /boot, /var, /tmp, /home, /var/spool, etc. I do this in fedora. It is just a matter of adding the appropriate entries in /etc/fstab. Fedora does this automatically, and they use mount by UUID. For LFS, you have to add the entries yourself. The lfs book uses mount by device file. However, I use mount by uuid in lfs.
 
Old 10-28-2017, 12:42 PM   #24
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 adding rootdelay=10 to kernel line
 
Old 10-30-2017, 09:11 AM   #25
hariskar
Member
 
Registered: Feb 2017
Distribution: Gentoo, Linux From Scratch
Posts: 53

Original Poster
Rep: Reputation: Disabled
I updated kernel,
Code:
menuentry 'Linux From Scratch (SVN-20171020) (on /dev/sdc2)' --class linuxfromscratch --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-simple-ced3ff82
-9a1b-44e6-9228-307bd327ddbb' {
        insmod part_gpt
        insmod ext2
        set root='hd2,gpt1'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-bios=hd2,gpt1 --hint-efi=hd2,gpt1 --hint-baremetal=ahci2,gpt1  39f2e8f2-927c-4e8a-95f2-d73bcc5ab498
        else
          search --no-floppy --fs-uuid --set=root 39f2e8f2-927c-4e8a-95f2-d73bcc5ab498
        fi
        linux /vmlinuz root=/dev/sdc2
}
run grub-mkconfig -o /boot/grub/grub.cfg and everything works. I wonder why that happened.
 
  


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
ACPI Error: Namespace lookup failure, AE_NOT_FOUND - 1st time arch dual boot attempt F711 Arch 10 12-02-2017 09:17 AM
error: file '/boot/vmlinuz-4.9.9-lfs-8.0' not found. anon213 Linux From Scratch 7 07-11-2017 02:17 PM
[SOLVED] Error file boot/vmlinuz-huge 4.4.29 not found Ztcoracat Slackware 10 12-13-2016 01:33 AM
[SOLVED] /boot/vmlinuz-4.1.15-8-default not found Bapun007 SUSE / openSUSE 2 02-24-2016 01:13 AM

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

All times are GMT -5. The time now is 11:23 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