×

Pages

Labels

Search

×

Pages

×
×

Notice

The site is currently undergoing scheduled maintenance, and may not function correctly. Please come back later.

Advertisement

advertisement

Create A Compressed Frugal Rambooting Debian 9.0.0 AMD64 XFCE Installation

These steps cover creating a compressed frugal rambooting Debian installation using the live-boot method. The steps also cover updating the installation using a temporary flat-install. These steps assume 2 fresh Debian installations are already present. One will act as the environment used to build the installation files (referred to as the build installation), the other will be used a source for the installation files to be made from (referred to as the source installation). An additional empty device will be needed for the installation.

Create Installation Files:
These steps will create a set of installation files which will be used to create the installation.

1. Login as root on the source installation.
2. Open terminal, and type "mv '/etc/apt/sources.list' '/etc/apt/sources.list.original'".
3. In terminal type "echo 'deb http://security.debian.org/debian-security stretch/updates main' >> '/etc/apt/sources.list'".
4. In terminal type "echo 'deb-src http://security.debian.org/debian-security stretch/updates main' >> '/etc/apt/sources.list'".
5. In terminal type "echo 'deb http://deb.debian.org/debian/ stretch-updates main' >> '/etc/apt/sources.list'".
6. In terminal type "echo 'deb-src http://deb.debian.org/debian/ stretch-updates main' >> '/etc/apt/sources.list'".
7. In terminal, and type "echo 'deb http://deb.debian.org/debian/ stretch main' >> '/etc/apt/sources.list'".
8. In terminal, and type "echo 'deb-src http://deb.debian.org/debian/ stretch main' >> '/etc/apt/sources.list'".
9. In terminal type "apt-get update".
10. In terminal type "apt-get install xorriso live-boot live-build live-tools initramfs-tools squashfs-tools gdisk tar zip unzip".
11. In terminal type "apt-get clean". This will delete debian packages from the APT cache!
12. In terminal type "mv '/etc/apt/sources.list.original' '/etc/apt/sources.list'".
13. In terminal type "apt-get update". You will get errors, ignore them.
14. Reboot. Login as root on the source installation.
15. Reboot. Login as root on the build installation.
16. Open terminal, and type "mv '/etc/apt/sources.list' '/etc/apt/sources.list.original'".
17. In terminal type "echo 'deb http://security.debian.org/debian-security stretch/updates main' >> '/etc/apt/sources.list'".
18. In terminal type "echo 'deb-src http://security.debian.org/debian-security stretch/updates main' >> '/etc/apt/sources.list'".
19. In terminal type "echo 'deb http://deb.debian.org/debian/ stretch-updates main' >> '/etc/apt/sources.list'".
20. In terminal type "echo 'deb-src http://deb.debian.org/debian/ stretch-updates main' >> '/etc/apt/sources.list'".
21. In terminal, and type "echo 'deb http://deb.debian.org/debian/ stretch main' >> '/etc/apt/sources.list'".
22. In terminal, and type "echo 'deb-src http://deb.debian.org/debian/ stretch main' >> '/etc/apt/sources.list'".
23. In terminal type "apt-get update".
24. In terminal type "apt-get install xorriso squashfs-tools tar zip unzip gdisk".
25. In terminal type "apt-get clean". This will delete debian packages from the APT cache!
26. In terminal type "mv '/etc/apt/sources.list.original' '/etc/apt/sources.list'".
27. In terminal type "apt-get update". You will get errors, ignore them.
28. In terminal type "mkdir '/media/sourceinstallation'".
29. In terminal type "blkid". Find the partition of the source installation, and note the device path (eg: "/dev/sdb2").
30. In terminal type "mount '/dev/sdb2' '/media/sourceinstallation'" Substitute "/dev/sdb2" for the device path of the source installation.
31. In terminal type "mv '/media/sourceinstallation/etc/fstab' '/media/sourceinstallation/etc/fstab.original'".
32. In terminal type "echo '#OSP' >> '/media/sourceinstallation/etc/fstab'.
33. In terminal type "echo -e "#UUID=a893cdad-bd69-4f85-982f-cd0ad518a22f\t/\text4\terrors=remount-ro\t0\t1" >> '/media/sourceinstallation/etc/fstab'".
34. In terminal type "echo '#SWAP' >> '/media/sourceinstallation/etc/fstab'.
35. In terminal type "echo -e "#UUID=a893cdad-bd69-4f85-982f-cd0ad518a22f\tnone\tswap\tsw\t0\t0" >> '/media/sourceinstallation/etc/fstab'".
36. In terminal type "echo '#DVD/CD Drive' >> '/media/sourceinstallation/etc/fstab'.
37. In terminal type "echo -e "/dev/sr0\t/media/cdrom0\tudf,iso9660\tuser,noauto\t0\t0" >> '/media/sourceinstallation/etc/fstab'".
38. In terminal type "mkdir -p '/root/installationfiles/OSP'".
39. In terminal type "mksquashfs '/media/sourceinstallation' '/root/installationfiles/OSP/filesystem.squashfs'".
40. In terminal type "cd '/root/installationfiles/OSP' && xorriso -dev '/root/installationfiles/OSP/rootfs.iso' -add 'filesystem.squashfs' && cd -".
41. In terminal type "rm '/root/installationfiles/OSP/filesystem.squashfs'".
42. In terminal type "mv '/media/sourceinstallation/etc/fstab.original' '/media/sourceinstallation/etc/fstab'".
43. In terminal type "mkdir '/root/installationfiles/OSP/boot'".
44. In terminal type "cp '/media/sourceinstallation/boot/initrd.img-4.9.0-3-amd64' '/root/installationfiles/OSP/boot/initrd.img'".
45. In terminal type "cp '/media/sourceinstallation/boot/vmlinuz-4.9.0-3-amd64' '/root/installationfiles/OSP/boot/vmlinuz'".
46. In terminal type "umount '/media/sourceinstallation'".
47. In terminal type "rmdir '/media/sourceinstallation'".
48. In terminal type "mkdir '/root/installationfiles/OSP/boot/grub'".
49. In terminal type "echo '#Graphics' >> '/root/installationfiles/OSP/boot/grub/grub.cfg'".
50. In terminal type "echo 'insmod efi_gop' >> '/root/installationfiles/OSP/boot/grub/grub.cfg'".
51. In terminal type "echo 'insmod efi_uga' >> '/root/installationfiles/OSP/boot/grub/grub.cfg'".
52. In terminal type "echo 'insmod ieee1275_fb' >> '/root/installationfiles/OSP/boot/grub/grub.cfg'".
53. In terminal type "echo 'insmod vbe' >> '/root/installationfiles/OSP/boot/grub/grub.cfg'".
54. In terminal type "echo 'insmod vga' >> '/root/installationfiles/OSP/boot/grub/grub.cfg'".
55. In terminal type "echo 'insmod video_bochs' >> '/root/installationfiles/OSP/boot/grub/grub.cfg'".
56. In terminal type "echo 'insmod video_cirrus' >> '/root/installationfiles/OSP/boot/grub/grub.cfg'".
57. In terminal type "echo 'insmod all_video' >> '/root/installationfiles/OSP/boot/grub/grub.cfg'".
58. In terminal type "echo 'insmod gfxterm' >> '/root/installationfiles/OSP/boot/grub/grub.cfg'".
59. In terminal type "echo 'set gfxmode=auto' >> '/root/installationfiles/OSP/boot/grub/grub.cfg'".
60. In terminal type "echo '' >> '/root/installationfiles/OSP/boot/grub/grub.cfg'".
61. In terminal type "echo '#Theme' >> '/root/installationfiles/OSP/boot/grub/grub.cfg'".
62. In terminal type "echo 'set color_normal=white/black' >> '/root/installationfiles/OSP/boot/grub/grub.cfg'".
63. In terminal type "echo 'set color_highlight=black/white' >> '/root/installationfiles/OSP/boot/grub/grub.cfg'".
64. In terminal type "echo 'set menu_color_normal=white/black' >> '/root/installationfiles/OSP/boot/grub/grub.cfg'".
65. In terminal type "echo 'set menu_color_highlight=black/white' >> '/root/installationfiles/OSP/boot/grub/grub.cfg'".
66. In terminal type "echo '' >> '/root/installationfiles/OSP/boot/grub/grub.cfg'".
67. In terminal type "echo '#Menu Entries' >> '/root/installationfiles/OSP/boot/grub/grub.cfg'".
68. In terminal type "echo 'menuentry "Debian Compressed Frugal (Ramboot)" {' >> '/root/installationfiles/OSP/boot/grub/grub.cfg'".
69. In terminal type "echo -e "\tsearch --no-floppy --fs-uuid --set=root b23a39a1-a5b8-456e-a3d1-783e59907c0b" >> '/root/installationfiles/OSP/boot/grub/grub.cfg'".
70. In terminal type "echo -e "\tinsmod gzio" >> '/root/installationfiles/OSP/boot/grub/grub.cfg'".
71. In terminal type "echo -e "\tinsmod part_gpt" >> '/root/installationfiles/OSP/boot/grub/grub.cfg'".
72. In terminal type "echo -e "\tinsmod ext2" >> '/root/installationfiles/OSP/boot/grub/grub.cfg'".
73. In terminal type "echo -e "\tlinux\t/boot/vmlinuz boot=live toram live-media-path=/ findiso=/rootfs.iso root=UUID=b23a39a1-a5b8-456e-a3d1-783e59907c0b ro quiet" >> '/root/installationfiles/OSP/boot/grub/grub.cfg'".
74. In terminal type "echo -e "\tinitrd\t/boot/initrd.img" >> '/root/installationfiles/OSP/boot/grub/grub.cfg'".
75. In terminal type "echo '}' >> '/root/installationfiles/OSP/boot/grub/grub.cfg'".
76. In terminal type "echo 'menuentry "Debian Compressed Frugal (Boot)" {' >> '/root/installationfiles/OSP/boot/grub/grub.cfg'".
77. In terminal type "echo -e "\tsearch --no-floppy --fs-uuid --set=root b23a39a1-a5b8-456e-a3d1-783e59907c0b" >> '/root/installationfiles/OSP/boot/grub/grub.cfg'".
78. In terminal type "echo -e "\tinsmod gzio" >> '/root/installationfiles/OSP/boot/grub/grub.cfg'".
79. In terminal type "echo -e "\tinsmod part_gpt" >> '/root/installationfiles/OSP/boot/grub/grub.cfg'".
80. In terminal type "echo -e "\tinsmod ext2" >> '/root/installationfiles/OSP/boot/grub/grub.cfg'".
81. In terminal type "echo -e "\tlinux\t/boot/vmlinuz boot=live live-media-path=/ findiso=/rootfs.iso root=UUID=b23a39a1-a5b8-456e-a3d1-783e59907c0b ro quiet" >> '/root/installationfiles/OSP/boot/grub/grub.cfg'".
82. In terminal type "echo -e "\tinitrd\t/boot/initrd.img" >> '/root/installationfiles/OSP/boot/grub/grub.cfg'".
83. In terminal type "echo '}' >> '/root/installationfiles/OSP/boot/grub/grub.cfg'".
84. In terminal type "echo 'menuentry "Debian Compressed Frugal (Ramboot) [Old]" {' >> '/root/installationfiles/OSP/boot/grub/grub.cfg'".
85. In terminal type "echo -e "\tsearch --no-floppy --fs-uuid --set=root b23a39a1-a5b8-456e-a3d1-783e59907c0b" >> '/root/installationfiles/OSP/boot/grub/grub.cfg'".
86. In terminal type "echo -e "\tinsmod gzio" >> '/root/installationfiles/OSP/boot/grub/grub.cfg'".
87. In terminal type "echo -e "\tinsmod part_gpt" >> '/root/installationfiles/OSP/boot/grub/grub.cfg'".
88. In terminal type "echo -e "\tinsmod ext2" >> '/root/installationfiles/OSP/boot/grub/grub.cfg'".
89. In terminal type "echo -e "\tlinux\t/boot/vmlinuz.old boot=live toram live-media-path=/ findiso=/rootfs.iso.old root=UUID=b23a39a1-a5b8-456e-a3d1-783e59907c0b ro quiet" >> '/root/installationfiles/OSP/boot/grub/grub.cfg'".
90. In terminal type "echo -e "\tinitrd\t/boot/initrd.img.old" >> '/root/installationfiles/OSP/boot/grub/grub.cfg'".
91. In terminal type "echo '}' >> '/root/installationfiles/OSP/boot/grub/grub.cfg'".
92. In terminal type "echo 'menuentry "Debian Compressed Frugal (Boot) [Old]" {' >> '/root/installationfiles/OSP/boot/grub/grub.cfg'".
93. In terminal type "echo -e "\tsearch --no-floppy --fs-uuid --set=root b23a39a1-a5b8-456e-a3d1-783e59907c0b" >> '/root/installationfiles/OSP/boot/grub/grub.cfg'".
94. In terminal type "echo -e "\tinsmod gzio" >> '/root/installationfiles/OSP/boot/grub/grub.cfg'".
95. In terminal type "echo -e "\tinsmod part_gpt" >> '/root/installationfiles/OSP/boot/grub/grub.cfg'".
96. In terminal type "echo -e "\tinsmod ext2" >> '/root/installationfiles/OSP/boot/grub/grub.cfg'".
97. In terminal type "echo -e "\tlinux\t/boot/vmlinuz.old boot=live live-media-path=/ findiso=/rootfs.iso root=UUID=b23a39a1-a5b8-456e-a3d1-783e59907c0b ro quiet" >> '/root/installationfiles/OSP/boot/grub/grub.cfg'".
98. In terminal type "echo -e "\tinitrd\t/boot/initrd.img.old" >> '/root/installationfiles/OSP/boot/grub/grub.cfg'".
99. In terminal type "echo '}' >> '/root/installationfiles/OSP/boot/grub/grub.cfg'".
100. In terminal type "echo 'menuentry "Debian Flat" {' >> '/root/installationfiles/OSP/boot/grub/grub.cfg'".
101. In terminal type "echo -e "\tsearch --no-floppy --fs-uuid --set=root b23a39a1-a5b8-456e-a3d1-783e59907c0b" >> '/root/installationfiles/OSP/boot/grub/grub.cfg'".
102. In terminal type "echo -e "\tinsmod gzio" >> '/root/installationfiles/OSP/boot/grub/grub.cfg'".
103. In terminal type "echo -e "\tinsmod part_gpt" >> '/root/installationfiles/OSP/boot/grub/grub.cfg'".
104. In terminal type "echo -e "\tinsmod ext2" >> '/root/installationfiles/OSP/boot/grub/grub.cfg'".
105. In terminal type "echo -e "\tlinux\t/vmlinuz root=UUID=b23a39a1-a5b8-456e-a3d1-783e59907c0b ro quiet" >> '/root/installationfiles/OSP/boot/grub/grub.cfg'".
106. In terminal type "echo -e "\tinitrd\t/initrd.img" >> '/root/installationfiles/OSP/boot/grub/grub.cfg'".
107. In terminal type "echo '}' >> '/root/installationfiles/OSP/boot/grub/grub.cfg'".
108. In terminal type "tar -cpf '/root/installationfiles/OSP.tar' -C '/root/installationfiles/OSP' 'boot' 'rootfs.iso'".
109. In terminal type "rm -r '/root/installationfiles/OSP'".
110. In terminal type "cd '/root/installationfiles' && zip -0 -r '/root/Installation Files.zip' 'OSP.tar' && cd -".
111. In terminal type "rm -r '/root/installationfiles'".
112. Logoff the build installation.

Install:
These steps cover installing the created installation files onto a device (eg: "hard drive, ssd, flashdrive").

1. Login as root on the build installation.
2. Connect the device which the installation files will be installed to. All existing content on the device will be deleted during installation!
3. In terminal type "lsblk -a -p", find the device being installed to, and note the device path (eg: "/dev/sdc").
4. In terminal type "sgdisk --zap-all '/dev/sdc'". Replace "/dev/sdc" with the device being installed to.
5. In terminal type "sgdisk -g '/dev/sdc'". Replace "/dev/sdc" with the device being installed to.
6. In terminal type "sgdisk -n 1:0:+128M '/dev/sdc'". Replace "/dev/sdc" with the device being installed to. Replace "128" with the size in Mebibytes you want the ESP (EFI System Partition) to be. If you don't what size to use, keep it at 128.
7. In terminal type "mkfs -t vfat '/dev/sdc1'". Replace "/dev/sdc1" with the newly created ESP on the device being installed to.
8. In terminal type "sgdisk -n 2:0:+20G '/dev/sdc'". Replace "/dev/sdc" with the device being installed to. Replace "20" with the size in Gibibytes you want the OSP (Operating System Partition) to be. How large you make it depends on the size of your installation files, and how large the device being installed to is.
9. In terminal type "mkfs -t ext4 '/dev/sdc2'". Replace "/dev/sdc2" with the newly created OSP on the device being installed to.
10. In terminal type "sgdisk -n 3:0:+20G '/dev/sdc'". Replace "/dev/sdc" with the device being installed to. Replace "20" with the size in Gigabytes you want for an empty partition. This partition will be used to house a temporary flat-install. How large you make it depends on the size of your extracted installation files, and how large the device being installed to is.
11. In terminal type "mkfs -t ext4 '/dev/sdc3'". Replace "/dev/sdc3" with the newly created empty partition on the device being installed to.

[OPTIONAL: Only if you want to create a swap partition]
12. In terminal type "sgdisk -n 4:0:+10G '/dev/sdc'". Replace "/dev/sdc" with the device being installed to. Replace "10" with the size in Gigabytes you want for a swap partition. If you have lots of RAM, or are installing on a slow device, you probably don't want to create one! How large you make it depends how large the device being installed to is, and how much memory you tend to use. The installation is NOT configured to automount any swap partitions. If you want your new installation to, you'll need to edit the fstab of your installation afterwards.
13. In terminal type "mkswap '/dev/sdc4'". Replace "/dev/sdc4" with the newly created swap partition on the device being installed to.
[/OPTIONAL]

14. In terminal type "blkid". Note the device path for the OSP on the device being installed to (eg: "/dev/sdc2").
15. In terminal type "mkdir '/media/installationosp'".
16. In terminal type "mount '/dev/sdc2' '/media/installationosp'". Substitute '/dev/sdc2' for the OSP device path previously taken note of.
17. In terminal type "unzip -p '/root/Installation Files.zip' 'OSP.tar' | tar -xpf - -C '/media/installationosp'".
18. In terminal type "blkid". Note the filesystem UUID (eg: "193612fe-a009-4514-847c-4880feb5173a") for the OSP (eg: "/dev/sdc2") on the device being installed to.
19. In terminal type "sed -i 's/b23a39a1-a5b8-456e-a3d1-783e59907c0b/193612fe-a009-4514-847c-4880feb5173a/g' '/media/installationosp/boot/grub/grub.cfg'". Substitute "193612fe-a009-4514-847c-4880feb5173a" for the previously noted UUID of the OSP on the device being installed to.
20. In terminal type "mkdir '/media/installationesp'".
21. In terminal type "blkid". Note the device path for the ESP on the device being installed to (eg: "/dev/sdc1").
22. In terminal type "mount '/dev/sdc1' '/media/installationesp'". Substitute "/dev/sdc1" for the ESP on the device being installed to.
23. In terminal type "grub-install --efi-directory='/media/installationesp' --uefi-secure-boot '/dev/sdc' --boot-directory='/media/installationosp/boot' --bootloader-id='Debian Compressed Frugal' --removable". Substitute  '/dev/sdc' for the device being installed to.
24. In terminal type "umount '/media/installationosp'".
25. In terminal type "rmdir '/media/installationosp'".
26. In terminal type "umount '/media/installationesp'".
27. In terminal type "rmdir '/media/installationesp'".

Update:
These steps cover updating the frugal install by using a temporary flat-install built from the existing frugal install.

1. Boot the frugal installation using the "Debian Compressed Frugal (Ramboot)" entry. Login as root.
2. In terminal type "lsblk -a -p". Note the device path for the empty partition on the device which was installed to (eg: "/dev/sdc3").
3. In terminal type "mkfs -t ext4 '/dev/sdc3'". Replace "/dev/sdc3" with the device path of the empty partition on the device which was installed to. This will delete any data from the empty partition.
4. In terminal type "mkdir '/media/emptypartition'".
5. In terminal type "mount '/dev/sdc3' '/media/emptypartition'". Substitute "/dev/sdc3" for the empty partition on the device which was installed to.
6. In terminal type "lsblk -a -p". Note the device path for the OSP on the device which was installed to (eg: "/dev/sdc2").
7. In terminal type "mkdir '/media/osp'.
8. In terminal type "mount '/dev/sdc2' '/media/osp'. Substitute "/dev/sdc2' for the OSP on the device which was installed to.
9. In terminal type "mkdir '/media/iso'".
10. In terminal type "mount '/media/osp/rootfs.iso' '/media/iso'".
11. In terminal type "unsquashfs -f -d '/media/emptypartition' '/media/iso/filesystem.squashfs'".
12. In terminal type "umount '/media/iso'".
13. In terminal type "rmdir '/media/iso'".
14. In terminal type "cat '/media/osp/boot/grub/grub.cfg' | head --lines=53 | tail --lines=1". Note the UUID after the word "root". This is the old UUID of the empty partition (eg: "a893cdad-bd69-4f85-982f-cd0ad518a22f").
15. In terminal type "blkid". Note the UUID of the empty partition on the device which was installed to (eg: "2ba04756-ecee-4a95-a78d-a23f455f6605").
16. In terminal type "sed -i '53s/a893cdad-bd69-4f85-982f-cd0ad518a22f/2ba04756-ecee-4a95-a78d-a23f455f6605/' '/media/osp/boot/grub/grub.cfg'". Substitute "a893cdad-bd69-4f85-982f-cd0ad518a22f" for the old UUID of the empty partition filesystem. Substitute "2ba04756-ecee-4a95-a78d-a23f455f6605" for the current UUID of the empty partition filesystem.
17. In terminal type "sed -i '57s/a893cdad-bd69-4f85-982f-cd0ad518a22f/2ba04756-ecee-4a95-a78d-a23f455f6605/' '/media/osp/boot/grub/grub.cfg'". Substitute "a893cdad-bd69-4f85-982f-cd0ad518a22f" for the old UUID of the empty partition filesystem. Substitute "2ba04756-ecee-4a95-a78d-a23f455f6605" for the current UUID of the empty partition filesystem.
18. In terminal type "cat '/media/emptypartition/etc/fstab' | head --lines=2 | tail --lines=1". Note the UUID after "UUID=". This is the old UUID of the empty partition (eg: "a893cdad-bd69-4f85-982f-cd0ad518a22f").
19. In terminal type "blkid". Note the UUID of the empty partition on the device which was installed to (eg: "2ba04756-ecee-4a95-a78d-a23f455f6605").
20. In terminal type "sed -i '2s/a893cdad-bd69-4f85-982f-cd0ad518a22f/2ba04756-ecee-4a95-a78d-a23f455f6605/' '/media/emptypartition/etc/fstab'". Substitute "a893cdad-bd69-4f85-982f-cd0ad518a22f" for the old UUID of the empty partition filesystem. Substitute "2ba04756-ecee-4a95-a78d-a23f455f6605" for the current UUID of the empty partition filesystem.
21. In terminal type "sed -i '2s/#UUID/UUID/' '/media/emptypartition/etc/fstab'".

[OPTIONAL: Only if you created a swap partition that you wish to auto-mount at boot, and only the first time you complete the update steps.]
22. In terminal type "cat '/media/emptypartition/etc/fstab' | head --lines=4 | tail --lines=1". Note the UUID after "UUID=". This is the old UUID of the swap partition (eg: "a893cdad-bd69-4f85-982f-cd0ad518a22f").
23. In terminal type "blkid". Note the UUID of the swap partition on the device which was installed to (eg: "3826ddd1-47f1-4b7e-bec3-058bfdea0af1").
24. In terminal type "sed -i '4s/a893cdad-bd69-4f85-982f-cd0ad518a22f/3826ddd1-47f1-4b7e-bec3-058bfdea0af1/' '/media/emptypartition/etc/fstab'". Substitute "a893cdad-bd69-4f85-982f-cd0ad518a22f" for the old UUID of the swap partition filesystem. Substitute "3826ddd1-47f1-4b7e-bec3-058bfdea0af1" for the current UUID of the swap partition filesystem.
25. In terminal type "sed -i '4s/#UUID/UUID/' '/media/emptypartition/etc/fstab'".
[/OPTIONAL]

26. In terminal type "umount '/media/osp'".
27. In terminal type "rmdir '/media/osp'".
28. In terminal type "umount '/media/emptypartition'".
29. In terminal type "rmdir '/media/emptypartition'".
30. Reboot. Use the "Debian Flat" menu entry to boot the flat-installation. Login as root.
32. Make desired changes to the flat-installation.
33. In terminal type "lsblk -a -p". Note the device path for the OSP on the device which was installed to (eg: "/dev/sdc2").
34. In terminal type "mkdir '/media/osp'".
35. In terminal type "mount '/dev/sdc2' '/media/osp'". Substitute "/dev/sdc2" for the device path of the OSP on the device which was installed to (eg: "/dev/sdc2").
36. In terminal type "mv '/media/osp/boot/initrd.img' '/media/osp/boot/initrd.img.old'".
37. In terminal type "mv '/media/osp/boot/vmlinuz' '/media/osp/boot/vmlinuz.old'".
38. In terminal type "mv '/media/osp/rootfs.iso' '/media/osp/rootfs.iso.old'".
39. In terminal type "umount '/media/osp'".
40. In terminal type "rmdir '/media/osp'".
41. Reboot. Use the "Debian Compressed Frugal (Ramboot) [Old]" menu entry to boot the old frugal installation. Login as root.
42. In terminal type "lsblk -a -p". Note the device path for the OSP on the device which was installed to (eg: "/dev/sdc2").
43. In terminal type "mkdir '/media/osp'".
44. In terminal type "mount '/dev/sdc2' '/media/osp'". Substitute "/dev/sdc2" for the device path of the OSP on the device which was installed to (eg: "/dev/sdc2").
45. In terminal type "lsblk -a -p". Note the device path for the empty partition on the device which was installed to (eg: "/dev/sdc3").
46. In terminal type "mkdir '/media/emptypartition'".
47. In terminal type "mount '/dev/sdc3' '/media/emptypartition'". Substitute "/dev/sdc3" for the device path of the empty partition on the device which was installed to (eg: "/dev/sdc3").
48. In terminal type "sed -i '2s/UUID/#UUID/' '/media/emptypartition/etc/fstab'".

[OPTIONAL:Only if you have a swap partition, which was configured to auto-mount at boot, and you want to prevent the swap partition from auto-mounting at boot.]
49. In terminal type "sed -i '4s/UUID/#UUID/' '/media/emptypartition/etc/fstab'".
[/OPTIONAL]

50. In terminal type "mksquashfs '/media/emptypartition' '/media/osp/filesystem.squashfs'".
51. In terminal type "cd '/media/osp' && xorriso -dev '/media/osp/rootfs.iso' -add 'filesystem.squashfs' && cd -".
52. In terminal type "rm '/media/osp/filesystem.squashfs'".
53. In terminal type "basename $(find '/media/emptypartition/boot' -type f -iname "*initrd*" | head --lines=1)". Note the filename of the initrd file (eg: "initrd.img-4.9.0-3-amd64").
54. In terminal type "cp '/media/emptypartition/boot/initrd.img-4.9.0-3-amd64' '/media/osp/boot/initrd.img'". Substitute "initrd.img-4.9.0-3-amd64" for the previously noted filename of the initrd file (eg: "initrd.img-4.9.0-3-amd64").
55. In terminal type "basename $(find '/media/emptypartition/boot' -type f -iname "*vmlinuz*" | head --lines=1)". Note the filename of the vmlinuz file (eg: "vmlinuz-4.9.0-3-amd64").
56. In terminal type "cp '/media/emptypartition/boot/vmlinuz-4.9.0-3-amd64' '/media/osp/boot/vmlinuz'". Substitute "vmlinuz-4.9.0-3-amd64" for the previously noted filename of the initrd file (eg: "vmlinuz-4.9.0-3-amd64").
57. In terminal type "umount '/media/osp'".
58. In terminal type "rmdir '/media/osp'".
59. In terminal type "umount '/media/emptypartition'".
60. In terminal type "rmdir '/media/emptypartition'".
61. Reboot. Use the "Debian Compressed Frugal (Ramboot)" menu entry to boot the updated frugal installation. Login as root.
62. In terminal type "lsblk -a -p". Note the device path for the empty partition on the device which was installed to (eg: "/dev/sdc3").
63. In terminal type "mkfs -t ext4 '/dev/sdc3'". Replace "/dev/sdc3" with the device path of the empty partition on the device which was installed to. This will delete any data from the empty partition.

Notes:
- Live-boot does not work well when multiple squashfs files exist on a device. It has a habbit, depending on the name, of loading multiple squashfs files at once. As a work around, these steps pack the squashfs files into ISO's which allows specifying an exact file to load.
- Live-boot does not support live-media-path's with periods, or underscores when booting to ram. Instead it will boot.
- The temporary flat-install created during updating must have the fstab configured or the xserver will fail at login, and startx will not be able to start it.
- These steps assume a the Debian 9.0.0 AMD64 XFCE CD 1 was used to install, that no software repository network mirror was configured during the installation process, that updates weren't installed during installation, and that the installation does not use seperate home and boot partitions.
- The frugal install will not have a background image displayed in Grub, because this can't be configured in grub.cfg.
- When using "grub-install" in these steps "--bootloader-id='Debian Compressed Frugal'" is specified. Normally this sets the folder name used on the ESP (eg: "/EFI/Debian Compressed Frugal"), and the entry name used in the UEFI (eg: "Debian Compressed Frugal"). In these steps "--removable" is also used, which overrules the ID specification, and makes grub install to /EFI/BOOT on the ESP. It will also use the name "BOOTX64.EFI" instead of "grubx64.efi". UEFIs typically know to check ESPs for /EFI/BOOT/BOOTX64.EFI, which is why you can boot that boot manager when specifying to boot from a device entry. UEFIs typically don't know to search other directories (eg: "/EFI/Debian Compressed Frugal"), which means you can only boot the boot-manager if you have an entry (which grub would create) in your UEFI pointing to that EFI file. Because these steps use "--removable" there will be no entry; you will need to boot from the device entry instead.
- These notes only apply UEFI systems using a GPT.
- In these steps a grub boot folder is created on the OSP of the frugal install. Alternatively "--boot-directory=" could have been used to place the grub folder on the ESP, or a seperate boot partition. You can also create a grub folder containing a grub.cfg that just points to another grub.cfg on another partition.
- "live-config" isn't installed, because it isn't needed for this type of installation. It's used for creating frugal installations with modified configs like: creating a new user, changing the hostname, auto-logins.

License:Comprehensible Open License 1.0
Comprehensible Open License 1.0:

Material published under this license can be modified, forked, incorporated into other works, and distributed, provided the material remains under this license. Material published under this license is free of charge! Material published under this license is bound to the license release number it was published under. Material published under this license is provided as is. The author of material published under this license shan't be held liable for any negative occurrences that arise from use of the material the author published under this license.

Advertisment

advertisement
Copyright © James Daniel Marrs Ritchey.

Siteviews