LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 02-13-2019, 02:47 AM   #1
Terry Coats
Member
 
Registered: Mar 2017
Posts: 73

Rep: Reputation: 21
Can't boot lfs-8.3 from my new 4 terabyte drive


I've been compiling lfs 8.3 on a new 4 terabyte usb drive I just purchased.
I compiled the kernel and put it in /boot as per the instructions.
grub2 is run from my host system which is Ubuntu. I ran update-grub from
there and it saw lfs 8.3 on the new drive and put it into the grub boot menu.
When I attempt to boot grub responds with a "no such partition" message and
give a long identifier. I don't know if it is a guid or uuid.
Here's the relevant portion from grub.cfg after I did update-grub:
Code:
menuentry 'unknown Linux distribution (on /dev/sdb1)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-simple-f129096a-da2e-4946-ac60-765e5bad31cb' {
	insmod part_gpt
	insmod ext2
	set root='hd1,gpt1'
	if [ x$feature_platform_search_hint = xy ]; then
	  search --no-floppy --fs-uuid --set=root --hint-bios=hd1,gpt1 --hint-efi=hd1,gpt1 --hint-baremetal=ahci1,gpt1  f129096a-da2e-4946-ac60-765e5bad31cb
	else
	  search --no-floppy --fs-uuid --set=root f129096a-da2e-4946-ac60-765e5bad31cb
	fi
	linux /boot/vmlinuz-4.18.5-lfs-8.3 root=/dev/sdb1 rootdelay=10
I inserted the "rootdelay=10" thinking that might be the problem since it's a usb drive. Didn't help.
I'm pretty sure the problem is because the new drive is partitioned gpt.
I've not had a drive this big before. I partitioned it into 4 equal partitions
using gparted and am using /dev/sdb1, the first partition, to compile lfs 8.3 on.
I consider myself fairly knowledgeable but this one has me stumped.
Anybody got any ideas on this?
Here's the error message from grub:
Code:
error: no such device f129069a-da2e-4946-ac60-765e5bad31cb
error: no such partition

Last edited by Terry Coats; 02-13-2019 at 03:13 AM.
 
Old 02-13-2019, 06:57 AM   #2
spiky0011
Senior Member
 
Registered: Jan 2011
Location: PLANET-SPIKE
Distribution: /LFS/Debian
Posts: 2,419
Blog Entries: 1

Rep: Reputation: 387Reputation: 387Reputation: 387Reputation: 387
Hi
A gpt drive needs a boot partition, not the normal mbr type I,m not at my machine but I had to have a small partion at the begining. I think its called a GPT partition

So basically I have sdb1 is GPT Partition sdb2 boot sdb3,4>>15 are primary.

Is the machine uefi boot or legacy?

Last edited by spiky0011; 02-13-2019 at 07:06 AM.
 
Old 02-13-2019, 07:26 AM   #3
arch-linq
Member
 
Registered: Sep 2018
Location: Midwest, USA
Distribution: Arch,LFS,Kaos
Posts: 34

Rep: Reputation: Disabled
here's the book sysvinit MBR (not UEFI)grub.cfg :

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

insmod ext2
set root=(hd0,2)

menuentry "GNU/Linux, Linux 4.18.5-lfs-8.3" {
        linux   /boot/vmlinuz-4.18.5-lfs-8.3 root=/dev/sda2 ro
}
EOF
You said:
"grub2 is run from my host system which is Ubuntu. I ran update-grub from
there and it saw lfs 8.3 on the new drive and put it into the grub boot menu."


If one chooses to boot the host in uefi mode to build lfs then you are committed to using uefi and gpt together for LFS. That requires more skill and work than a old style MBR LFS install. For one you need a efi boot partiton of at least 512 MB which is what spiky mentioned. Also you would need to study up on ubu dual boot uefi grub.

I would read up on using os-prober and grub-mkconfig from the Ubu Wiki to solve this.

here's some info from my LFS that boots from a refind usb stick. I move drives around so I dont use efibootmgr to create a uefi bios entry for LFS.

Code:
 sudo fdisk -l
Disk /dev/sda: 149.1 GiB, 160041885696 bytes, 312581808 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 2C192639-138A-7F40-8FD1-571463E6A053

Device        Start       End   Sectors Size Type
/dev/sda1      2048   2099199   2097152   1G EFI System
/dev/sda2   2099200  44042239  41943040  20G Linux filesystem
/dev/sda3  44042240  48236543   4194304   2G Linux swap
/dev/sda4  48236544 184551423 136314880  65G Linux filesystem
Arch is the 20 GB host partition. LFS is the 65GB one.
Here's the LFS part of my arch uefi /boot/grub/grub.cfg:

Code:
# BEGIN /etc/grub.d/30_os-prober ###
menuentry 'Linux From Scratch (20180902-systemd) (on /dev/sda4)' --class linuxfromscratch --class gnu-linux --class gnu --class os $me$
        insmod part_gpt
        insmod ext2
        set root='hd0,gpt4'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-ieee1275='ieee1275//disk@0,gpt4' --hint-bios=hd0,gpt4 --hint-efi=hd0,gpt4 --h$
        else
          search --no-floppy --fs-uuid --set=root 9f4f3583-b8ec-405d-8d2e-9756ca248ea2
        fi
        linux /boot/vmlinuz-4.20.7-lfs-20190206-systemd root=/dev/sda4
}
Bottom line is this: Before you build LFS you have to decide which way you are going to boot UEFI or MBR. Not just build and then ask update-grub command to magically work on uefi or mbr. It not that smart of a script.

Last edited by arch-linq; 02-13-2019 at 08:00 AM.
 
Old 02-13-2019, 07:42 AM   #4
Terry Coats
Member
 
Registered: Mar 2017
Posts: 73

Original Poster
Rep: Reputation: 21
Quote:
Originally Posted by spiky0011 View Post
Hi
A gpt drive needs a boot partition, not the normal mbr type I,m not at my machine but I had to have a small partion at the begining. I think its called a GPT partition

So basically I have sdb1 is GPT Partition sdb2 boot sdb3,4>>15 are primary.

Is the machine uefi boot or legacy?
The American Megatrends bios says it is uefi capable but I guess I don't know how to mix
uefi and legacy boot. My Ubuntu host system is on an internal drive and that's where the
grub files are and I guess it's using legacy boot as I've never dome anything special
to get it to work.
I know the new gpt drive has space right at the beginning of the drive
for boot stuff but I don't know what to put there or how. I guess I should
have studied this big capacity hard-drive stuff before I bought one.
The 4 terabyte reads and writes just fine as I have been compiling software
on it. It mounts like any other drive. I've been using /dev/sdb1 (partition1)
for the linuxfromscratch work.
Thanks for the reply.
 
Old 02-13-2019, 08:45 AM   #5
spiky0011
Senior Member
 
Registered: Jan 2011
Location: PLANET-SPIKE
Distribution: /LFS/Debian
Posts: 2,419
Blog Entries: 1

Rep: Reputation: 387Reputation: 387Reputation: 387Reputation: 387
The UEFI or Legacy is in the bios as to how the machine boots, have a look through the bios to help, or google checking for uefi. Thats something you need to know. I dont use uefi boot.
 
Old 02-14-2019, 02:21 PM   #6
Terry Coats
Member
 
Registered: Mar 2017
Posts: 73

Original Poster
Rep: Reputation: 21
Well, I'm going to mark this solved even though it isn't.
I've wasted enough hours on it. I give up.
I've copied all the lfs 8.3 work I've done over to another
drive with a lot of space on it so I can continue to work
at compiling it. Now the first kernel I built does not
work but that's a different story. At least now I can work
on it again. Thanks to all who responded.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Terabyte drive problem Ronayn Linux - Hardware 3 08-02-2010 10:05 AM
Can rsync work with 10 terabyte data? ufmale Linux - Software 3 06-22-2008 06:09 PM
LXer: Kernel space: How to use a terabyte of RAM LXer Syndicated Linux News 0 03-20-2008 01:10 AM
problem installing red hat 5.1 on a 3 terabyte HP proliant server MightyU Red Hat 2 01-10-2008 10:29 AM
Suggestions for SuSe 10.2 LVM partioning for 4 drive terabyte server faron_young Linux - Newbie 3 05-08-2007 06:44 PM

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

All times are GMT -5. The time now is 07:06 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration