Installing Leap 42.1 on External SSD Drive Partitions

Greetings,

After quite long web surfing I have chosen OpenSuse Leap as my very first and serious Linux adventure.
My goal is to set up a portable, compatible portable system on my SSD 240 Gb portable drive to be used everywhere ? Well, almost.

As far as my newbie knowledge allows me there are to boot method eufi and… other.
I would appreciate any piece of advice on a partition scheme to apply during the install in order the disk could be safely bootable on both boot systems. My idea is to enlarge its compatibility.

It would be great if any kind guru could confirm or refute my intention of partitioning:

/ (root) - 25GB, ex4
/home - all available space rest, ex4
/swap area - 4Gb
/efi - …?
/ my_custom - 40GB, ntsf (partition to share custom data between Windows and Distro)

I would be thankful if I could obtain some valuable informations on an SSD drive on Linux.

Many thanks in advance.

EFI depends on how you plan to boot. MBR or EFI. With EFI you need a small EFI boot partition formatted FAT

With EFI boot you need first to boot the installer in EFI mode then it should take it from there the default file systems are currently BTRFS root and XFS home

If you want ext 4 you need to override the defaults.

With SSD and EXT4 there are some tweaks to extend the SSD life but worry about that after install

I assume you are using a GPT partition scheme and GRUB2 as boot manager. If you want to set up GRUB2 for booting on BIOS and UEFI machines you should add another small partition for GRUB2 (see more information in the GRUB2 manual).

If you want to use the disk with MS Windows you might need some MS partitions (MS reserved partition, …). But i do not use MS Windows so i can’t tell for sure.

Best regards

susejunky

I don’t have any SSD experience.

I have installed (I think it was opensuse 13.2) on an external drive, to boot either on UEFI or non-UEFI.

Partitioning: You will need an EFI partition, formatted to FAT. I suggest 128M, though 50M might be big enough. If using Legacy partitioning, then give that partition a type code of “ef”. I suggest GPT partitioning, and the partitioner that you use should be able to set the partition type for EFI. Or set the type code to “EF00” with “gdisk” (for GPT partitoning).

I suggest also a bios-boot partition (sometimes called “bios-grub”). This assumes that you are using GPT partitioning. It is possible to use Legacy partitioning, though the installer might complain. With GPT partitioning, you need a bios-boot partition to install grub into the MBR. I usually put the bios-boot partition in sectors 34-2047, which is space not normally used for other partitions.

Then use whatever you want for other partitions.

I suggest that you first install on a UEFI box. For that install, mount the EFI partition at “/boot/efi”. If you already have opensuse installed on that box, this might mess up booting to your already installed system, though that is fixable).

After you have completed the install, get to a root command line (or root konsole or whatever). Go to the directory “/boot/efi/EFI/Boot”. Delete any files there. Then copy the content of “/boot/efi/EFI/opensuse” to that directory (to “/boot/efi/EFI/Boot”. If the copied files include “shim.efi”, then rename that as “bootx64.efi”. Otherwise rename “grubx64.efi” to “bootx64.efi”. In the latter case, you will have to turn off secure-boot to boot this external drive.

Next: If you did not already have opensuse installed, then delete the boot entry for this, using “efibootmgr” (check the man pages and google for examples). If you did already have opensuse installed, then you can use “efibootmgr” to fix booting back to the system installed on your internal hard drive. Again, check the man pages and google for examples.

I recommend rebooting after these changes, to see if it works. On many UEFI systems, you can hit F12 during boot to get a boot menu and select your external drive.

Once this is working, boot into the system and use Yast Bootloader to switch to “grub2” (instead of “grub2-efi”). Then click the button for “Boot Loader Installation Details” (toward the bottom left, after the switch to “grub2”). That should give the disk order. Make sure that your external drive is first in disk order. Click OK on the disk order settings. Then check the box “Boot from Master Boot Record” and uncheck the box “write generic code to MBR”. Click OK (and then probably “Finish” on the next screen). Your system should now be bootable on non-UEFI systems, provided that you can set the BIOS to boot the external drive.

I just thought of another issue. You might have to edit “/etc/default/grub”. If you find a line “GRUB_USE_LINUXEFI=true” then change that “true” to “false”. Otherwise you might not be able to boot on a non-UEFI system. And, after changing that, you will need to disable secure-boot to use on a UEFI system. After that change to “/etc/default/grub”, you should run:

# grub2-mkconfig -o /boot/grub2/grub.cfg

Just two more things to take care of when you want to boot several different machines with your external SSD:

  1. As far as i can remember the secure boot loader (shim) that comes on the openSUSE 42.1 installation DVD is broken. You need to update it before you can do a secure boot. But you probably will update all installed packages directly after the installation anyway.
  2. In order to boot on different machines successfully your initrd must contain all packages needed at boot time (e.g. USB-modules).

Here you can find some more hints on using SSDs with openSUSE: https://en.opensuse.org/SDB:SSD_performance

Best regards

susejunky