Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Installing with root directory on an external disk
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
Holysword
l33t
l33t


Joined: 19 Nov 2006
Posts: 946
Location: Greece

PostPosted: Mon Sep 11, 2017 4:48 pm    Post subject: Installing with root directory on an external disk Reply with quote

I've been testing some stuff these days and decided to install Gentoo in one of my external hard drivers, while keeping the boot partition at the sda device.

I've tried to add the boot option using efibootmgr (I don't use a bootloader) like this:
Code:
efibootmgr -c -d /dev/sda -L "Gentoo Test" -l "\vmlinuz-4.9.48_new" -u "root=/dev/sdc1 rootfstype=ext4 init=/usr/lib/systemd/systemd"

but I guess that it was a bad idea after all. At boottime I get the error:
Code:
kernel panic - not syncing: VFS: /Unable to mount root fs on unknown-block(0,0)


Is there an (easy) way to do what I'm trying to do?
_________________
"Nolite arbitrari quia venerim mittere pacem in terram non veni pacem mittere sed gladium" (Yeshua Ha Mashiach)
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 8291
Location: Saint Amant, Acadiana

PostPosted: Mon Sep 11, 2017 5:39 pm    Post subject: Reply with quote

The error is coming from kernel, not bootloader. In other words, check out your kernel configuration and make sure the root device is correct. This /dev/sdc1 seems suspicious to me. What makes you think the kernel you are loading enumerates the external drive as third SCSI block device? I'd use PARTUID instead.
_________________
My Gentoo installation notes.
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
Holysword
l33t
l33t


Joined: 19 Nov 2006
Posts: 946
Location: Greece

PostPosted: Mon Sep 11, 2017 6:45 pm    Post subject: Reply with quote

Jaglover wrote:
The error is coming from kernel, not bootloader. In other words, check out your kernel configuration and make sure the root device is correct. This /dev/sdc1 seems suspicious to me. What makes you think the kernel you are loading enumerates the external drive as third SCSI block device? I'd use PARTUID instead.


Woops, sorry, old habits die hard. I've tried using PARTUID, but got the same error.

Code:
sleipnir ~ # efibootmgr -v
BootCurrent: 0000
Timeout: 1 seconds
BootOrder: 000B,0000,0007,0002,0008,0009,000A
Boot0000* Gentoo 4.9.16 HD(1,GPT,b2b17f74-9d02-4dda-9e48-cc931a945e56,0x800,0x40000)/File(\vmlinuz-4.9.16-gentoo)r.o.o.t.=./.d.e.v./.s.d.a.2. .r.o.o.t.f.s.t.y.p.e.=.e.x.t.4. .p.c.i.e._.p.o.r.t._.p.m.=.o.f.f. .r.c.u.t.r.e.e...r.c.u._.i.d.l.e._.g.p._.d.e.l.a.y.=.1. .i.n.i.t.=./.u.s.r./.l.i.b./.s.y.s.t.e.m.d./.s.y.s.t.e.m.d.
Boot000B* Gentoo New    HD(1,GPT,b2b17f74-9d02-4dda-9e48-cc931a945e56,0x800,0x40000)/File(\vmlinuz-4.9.48_new)r.o.o.t.=.P.A.R.T.U.U.I.D.=.4.b.1.8.5.f.6.6.-.4.2.8.f.-.4.7.9.1.-.9.b.d.0.-.7.8.a.0.b.6.b.5.f.5.e.7. .r.o.o.t.f.s.t.y.p.e.=.e.x.t.4. .i.n.i.t.=./.u.s.r./.l.i.b./.s.y.s.t.e.m.d./.s.y.s.t.e.m.d.
sleipnir ~ # lsblk -f
NAME     FSTYPE      LABEL UUID                                 MOUNTPOINT
sda
├─sda1   vfat              4AA0-C2C3                            /boot
└─sda2   ext3              f325ddc9-2ef6-4b69-ab40-7eb95f0b1944 /
sdb
└─sdb2   swap        swap  205d3dce-02f8-46c9-b374-a4818f141529 [SWAP]
sdc
└─sdc1   ext4        Slave 4b185f66-428f-4791-9bd0-78a0b6b5f5e7 /run/media/holysword/Slave
sleipnir ~ # cat /run/media/holysword/Slave/etc/fstab
/dev/sda1                                      /boot    vfat     defaults        0 1
PARTUUID=4b185f66-428f-4791-9bd0-78a0b6b5f5e7  /        ext4     noatime         0 1
PARTUUID=205d3dce-02f8-46c9-b374-a4818f141529  none     swap     sw              0 0


Are the external drivers supposed to be already readable at this point of the initialization?
_________________
"Nolite arbitrari quia venerim mittere pacem in terram non veni pacem mittere sed gladium" (Yeshua Ha Mashiach)
Back to top
View user's profile Send private message
DONAHUE
Watchman
Watchman


Joined: 09 Dec 2006
Posts: 7651
Location: Goose Creek SC

PostPosted: Tue Sep 12, 2017 2:06 am    Post subject: Reply with quote

In the good old days, placing the / partition on a usb drive generally required using a kernel boot option of either rootwait or rootdelay=<a few seconds> to allow time for the usb drive to "settle". This was even true for flash drives. Probably still true for your situation as the kernel is in charge.
_________________
Defund the FCC.
Back to top
View user's profile Send private message
charles17
Advocate
Advocate


Joined: 02 Mar 2008
Posts: 3664

PostPosted: Tue Sep 12, 2017 6:32 am    Post subject: Re: Installing with root directory on an external disk Reply with quote

Holysword wrote:
I've been testing some stuff these days and decided to install Gentoo in one of my external hard drivers, while keeping the boot partition at the sda device.

Why make it so difficult? Consider having an ESP per disk and dropping the kernel there. The computer should recognize all ESPs of all attached disks.
BTW: Some computers provide a built-in alternative to efibootmgr, see https://wiki.gentoo.org/wiki/EFI_System_Partition#UEFI_boot_items

Also, you might want to verify the ESP:
Code:
blkid | grep b2b17f74-9d02-4dda-9e48-cc931a945e56
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54244
Location: 56N 3W

PostPosted: Tue Sep 12, 2017 9:40 am    Post subject: Reply with quote

Holysword,

Two points. The USB subsystem needs to be started before root is mounted and normally, its not.

That means that
a) the kernel USB support needs to be available.
b) mounting root is delayed until USB is initialised.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum