just docs
[automated-distro-installer] / fai / config / files / boot / chboot / DEFAULT
index b90b9261187bd5ab6aaff97110a88cb819ad822e..021c74d42d4764d1391bc75f19c1a4c3c695134b 100755 (executable)
@@ -30,6 +30,23 @@ With no argument, print available distros
 DISTRO_NAME is based on the partition names in /boot.
 For example debianjessie for the partitionn boot_debianjessie.
 
+For a system without libreboot, which is failing completely to
+boot on one distro, here is how I did a chboot for it:
+# arch-pxe had been run previously
+pxe-server treetowl arch
+# reboot treetowl into arch live env
+pxe-server # disable pxe server
+ssh root@treetowl
+lsblk # identify boot dev. if boot dev is a raid, this could be repeated on all boot devs.
+mount /dev/sdd3 /mnt
+mount_point=/mnt/boot_debiantesting # the subvol i want to chboot to
+boot_disk=/dev/sdd
+grub-bios-setup -d $mount_point/grub/i386-pc -s -m $mount_point/grub/device.map $boot_disk
+reboot
+
+todo: figure out if it's possible to make a multi-distro grub like I have with libreboot
+for non-libreboot systems
+
 -r         Do not reboot.
 -d         Enable debug output.
 -h|--help  Print help and exit.
@@ -94,11 +111,10 @@ boot_disk=${boot_dev%%[0-9]*}
 # https://www.gnu.org/software/grub/manual/html_node/Device-map.html
 e grub-bios-setup -d $mount_point/grub/i386-pc -s -m $mount_point/grub/device.map $boot_disk
 
-# todo, mount_point needs subvolid=0
-
 e umount $mount_point
 
-e mount $boot_disk$grub_extn $mount_point
+# i don't change the default subvolid, so the arg here is just being cautious
+e mount -o subvolid=0 $boot_disk$grub_extn $mount_point
 e grub-editenv $mount_point/grubenv set last_boot=/boot_$distro
 e grub-editenv $mount_point/grubenv set did_fai_check=true
 e umount $mount_point