[Chromebooks] nabil2000:
Deploying, bootloading OSes such as Ubuntu manually

I like to initially install an OS to a 16/32 GB USB 3.0 stick, then dd it to a bigger SSD of I am happy with it, follows some notes on how it is done...

In previous post, I described how to fix an efi booting, but there is a caveat, one needs to know where & how to modify settings of efi bootlader, & /etc/fstab that tells the OS where to find partitions to load itself (bootstrap)...

These are some successful partition settings I had to deal with -

1. efi/mbr mix

$ sudo fdisk -l

Disk /dev/sdb: 465.8 GiB, 500107861504 bytes, 976773167 sectors

Units: sectors of 1 * 512 = 512 bytes

Sector size (logical/physical): 512 bytes / 4096 bytes

I/O size (minimum/optimal): 4096 bytes / 33553920 bytes

Disklabel type: gpt

Disk identifier: ***

Device Start End Sectors Size Type

/dev/sdb1 2048 411647 409600 200M EFI System

/dev/sdb2 411648 210208767 209797120 100G Microsoft basic data

/dev/sdb3 210415616 337403903 126988288 60.6G Linux filesystem

/dev/sdb4 337403904 430872575 93468672 44.6G Linux filesystem

/dev/sdb5 430872576 435066879 4194304 2G Linux swap

/dev/sdb6 435066880 624490495 189423616 90.3G Microsoft basic data

/dev/sdb7 624490496 976766975 352276480 168G Microsoft basic data

/dev/sdb8 210208768 210415615 206848 101M BIOS boot

Partition table entries are not in disk order.

/dev/sdb8 is BIOS boot invoked by bios_grub flag in gparted manage flags partition editor

/dev/sdb1 is efi partition flagged as boot, esp & legacy_boot in gparted manage flags partition editor

$ sudo fdisk -l

Disk /dev/sdc: 931.5 GiB, 1000204885504 bytes, 1953525167 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: xxx

Device Start End Sectors Size Type

/dev/sdc1 2048 206847 204800 100M BIOS boot

/dev/sdc2 206848 135235583 135028736 64.4G Linux filesystem

/dev/sdc3 135235584 286480383 151244800 72.1G Linux filesystem

/dev/sdc4 286480384 599062527 312582144 149.1G Microsoft basic data

/dev/sdc5 599062528 599984127 921600 450M Windows recovery environment

/dev/sdc6 599984128 1007575039 407590912 194.4G Microsoft basic data

/dev/sdc7 1007575040 1949327359 941752320 449.1G Microsoft basic data

/dev/sdc8 1949329408 1953103871 3774464 1.8G Linux swap

/dev/sdc9 1953105920 1953519615 413696 202M EFI System

/dev/sdc1 is BIOS boot invoked by bios_grub flag in gparted manage flags partition editor

/dev/sdc9 is efi partition flagged as boot, esp & legacy_boot in gparted manage flags partition editor

2. pure mbr / no BIOS boot - using Windows boot loader & easyBCD 3.2 to load Linux/Ubuntu

$ sudo fdisk -l

Disk /dev/sdc: 931.5 GiB, 1000204885504 bytes, 1953525167 sectors

Units: sectors of 1 * 512 = 512 bytes

Sector size (logical/physical): 512 bytes / 4096 bytes

I/O size (minimum/optimal): 4096 bytes / 33553920 bytes

Disklabel type: dos

Disk identifier: 0x767e7d2d

Device Boot Start End Sectors Size Id Type

/dev/sdc1 * 2048 472768511 472766464 225.4G 7 HPFS/NTFS/exFAT

/dev/sdc2 472768512 1422079999 949311488 452.7G 7 HPFS/NTFS/exFAT

/dev/sdc3 1422080221 1479591932 57511712 27.4G 83 Linux

/dev/sdc4 1479591933 1953523711 473931779 226G f W95 Ext'd (LBA)

/dev/sdc5 1479591936 1949331455 469739520 224G 83 Linux

/dev/sdc6 1949333504 1953523711 4190208 2G 82 Linux swap / Solaris

3. pure mbr (just Ubuntu, nothing else)

$ sudo fdisk -l

Disk /dev/sdc: 14.6 GiB, 15693664256 bytes, 30651688 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: 2BB06DCE-2D30-4778-94BD-2FD214CD3C3B

Device Start End Sectors Size Type

/dev/sdc1 2048 206847 204800 100M BIOS boot

/dev/sdc2 206848 28555263 28348416 13.5G Linux filesystem

/dev/sdc3 28555264 30650367 2095104 1023M Linux swap

In 3. this is what to expect when you install Ubuntu to mbr, it will ask you to also create a BIOS boot partition of at least 1 MB - I chose here 100 MB to safeguard for future change, it's kind of a blob with core image for booting...

4. pure efi (just Ubuntu & EFI partition, nothing else)

$ sudo fdisk -l

Disk /dev/sdc: 29.3 GiB, 31406948352 bytes, 61341696 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: 0B9FB340-99D5-03A3-D0EC-E74275E6E800

Device Start End Sectors Size Type

/dev/sdc1 2048 411647 409600 200M EFI System

/dev/sdc2 411648 58195967 57784320 27.6G Linux filesystem

/dev/sdc3 58195968 61335551 3139584 1.5G Microsoft basic data

in 4. I prep a disk with the three partitions EFI, ROOT & SWAP Assign the flags for the EFI partition as as boot, esp & legacy_boot in gparted, then use an install dvd/usb disk to install by assigning the correct partitions...

3 & 4 I use to deploy, if it's just them, I just dd to a bigger disk,

if not, I use the ROOT to dd to a partition in a target partition in a bigger disk that is already populated with say Windows or OS X, or any other,

care has then to be taken not to disturb the initial order,

so ROOT for Ubuntu should be put at the end of the original installations, etc.

In the next post I will take an example & walk through it...