In this example I'm installing Tails to the internal storage of an ASUS Chromebook C302 with mrchromebox's EFI firmware. The steps should be the same for any Tails-supported EFI computer.
My internal disk is mmcblk0 and its first partition is mmcblk0p1 and my Tails USB drive is sda and its first partition is sda1. Yours may differ, so substitue appropriately.
The Tails installer doesn't seem to want to install to internal storage even though mine's recognized as an SD card.
-
Boot Tails as normal but set a root password in "Additional Settings".
-
Launch "Root Terminal".
-
Create partitions on internal storage with the same geometry as the Tails partitions.
parted /dev/sda(note the sector size).u ssets units to sectors.pprints the table.
parted /dev/mmcblk0(note the sector size).u smkpart Tails fat32 2048s 16777216s
-
Copy the Tails data:
dd bs=1M if=/dev/sda1 of=/dev/mmcblk0p1
Grub is configured to look for a bootable partition on removables only. To fix that:
-
Mount the installation target:
mount -t vfat /dev/mmcblk0p1 /mnt
-
Change the kernel command line:
sed -i 's/live-media=removable/live-media=\/dev\/mmcblk0p1/' /mnt/EFI/debian/grub.cfg
All that's left is to tell EFI to use grub:
-
Install
efibootmgrapt install efibootmgr- Install "only once" when prompted.
-
Create boot entry:
efibootmgr -c -d /dev/mmcblk0 -p 1 -L Tails -l '\EFI\BOOT\GRUBX64.EFI'
Reboot!
So far, upgrades go smoothly but revert the kernel command line. I put the following in an executable file on persistent storage:
#!/bin/bash
mount -o remount,rw /dev/mmcblk0p1 /lib/live/mount/medium
sed -i 's/live-media=removable/live-media=\/dev\/mmcblk0p1/' /lib/live/mount/medium/EFI/debian/grub.cfg
If you find yourself in an EFI shell: fs0: followed by EFI\BOOT\GRUBX64.EFI should launch grub.
If you find yourself in Tails needing to make changes to the read only file system: mount -o remount,rw /dev/mmcblk0p1 /lib/live/mount/medium should make it writable.
If you find yourself in the initramfs, reboot and press e in grub to fix the kernel command line. I don't know how to fix a live-boot from initramfs.
All suggestions welcome.