I bought a new external USB disk drive to put various
distros on to play with and try out. I didn't think about
what I was buying because Linux usually handles anything.
It turned out to be a gpt drive, something I've never had
to deal with before. It's a 4 terabyte drive. Here's what
my linuxfromscratch-8.3 says it is:
Code:
terry [ ~ ]$lsusb
...........
0bc2:331a Seagate RSS LLC
...........
I did some reading up on it and partitioned it into 5
partitions. 4 that I formatted into ext4 and a smaller
100 megabyte partition in case I needed some boot stuff.
Here's what fdisk shows on the drive:
Code:
Disk /dev/sdb: 3.7 TiB, 4000787029504 bytes, 7814037167 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: E79FD96E-32F6-41B9-9471-36742AB20DE6
Device Start End Sectors Size Type
/dev/sdb1 206848 1953509375 1953302528 931.4G Linux root (x86)
/dev/sdb2 1953509376 3907016703 1953507328 931.5G Linux filesystem
/dev/sdb3 3907016704 5860524031 1953507328 931.5G Linux filesystem
/dev/sdb4 5860524032 7814035455 1953511424 931.5G Linux filesystem
/dev/sdb5 2048 206847 204800 100M BIOS boot
Partition table entries are not in disk order.
sdb1 thru sdb4 work just fine for reading and writing data.
I installed a distro on sdb1, MX Linux to try out. No problems
there as far as I could tell. It seemed to install fine from
the dvd. Here's what /boot on the drive shows:
Code:
terry [ ~ ]$ ls /mnt/gpt1/boot
total 64220
drwxr-xr-x 3 root root 4096 May 17 14:35 .
drwxr-xr-x 22 root root 4096 Jul 22 11:52 ..
-rw-r--r-- 1 root root 206241 May 15 16:29 config-4.19.0-5-amd64
drwxr-xr-x 3 root root 4096 May 11 16:09 grub
-rw-r--r-- 1 root root 56631262 May 17 14:35 initrd.img-4.19.0-5-amd64
-rw-r--r-- 1 root root 182704 Jun 25 2015 memtest86+.bin
-rw-r--r-- 1 root root 184840 Jun 25 2015 memtest86+_multiboot.bin
-rw-r--r-- 1 root root 3304239 May 15 16:29 System.map-4.19.0-5-amd64
-rw-r--r-- 1 root root 5228416 May 15 16:29 vmlinuz-4.19.0-5-amd64
Everything necessary seems to be there.
I do the grub2 stuff from my Ubuntu system
on sda1 because that's where this current incarnation
of various Linux distros started.
From Ubuntu I ran "update-grub" so it could pick up the
new MX Linux distro and add it to the menu of bootable
systems. It saw the MX I installed to sdb1 and added it
to the grub menu. Here's what it says is there:
Code:
menuentry 'MX 18.3 Continuum (18.3) (on /dev/sdb1)' --class mx --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-simple-1d88c0e8-9d75-4832-896c-3a06cdbc795a' {
insmod part_gpt
insmod ext2
insmod usb
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 1d88c0e8-9d75-4832-896c-3a06cdbc795a
else
search --no-floppy --fs-uuid --set=root 1d88c0e8-9d75-4832-896c-3a06cdbc795a
fi
linux /boot/vmlinuz-4.19.0-5-amd64 root=/dev/sdb1
initrd /boot/initrd.img-4.19.0-5-amd64
}
submenu 'Advanced options for MX 18.3 Continuum (18.3) (on /dev/sdb1)' $menuentry_id_option 'osprober-gnulinux-advanced-1d88c0e8-9d75-4832-896c-3a06cdbc795a' {
menuentry 'MX 18.3 Continuum (18.3) (on /dev/sdb1)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-4.19.0-5-amd64--1d88c0e8-9d75-4832-896c-3a06cdbc795a' {
insmod part_gpt
insmod ext2
insmod usb
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 1d88c0e8-9d75-4832-896c-3a06cdbc795a
else
search --no-floppy --fs-uuid --set=root 1d88c0e8-9d75-4832-896c-3a06cdbc795a
fi
linux /boot/vmlinuz-4.19.0-5-amd64 root=/dev/sdb1
initrd /boot/initrd.img-4.19.0-5-amd64
}
}
The problem is when I try to boot this selection from the
grub boot menu I am told that the device is not found and
it refers to the uuid 1d88c0e8-9d75-4832-896c-3a06cdbc795a.
I don't understand. When "update-grub" was run it certainly
saw this uuid because it wrote it in grub.cfg.I also get
messages that the partition is not found and "kernel must be loaded first"
I suspect this is related to the fact that the disk is
gpt and needs some special magic but I don't know.
I'm fairly knowledgeable with Linux having used it for
years but this one has me stumped. Can anyone help?