the distro (bodhi linux which is the enlightenment-forked moksha de on top of an ubuntu base) i predominately use has a support board set up over at linuxquestions (lq). because it is designed to be lightweight, there are plenty of questions about use on older systems with hardware limitations. one recent issue was about wanting to upgrade from bodhi 3 to a newer version. the main problem was that the system only has a cd reader and for whatever reason the usb wouldn’t live boot. because of the expansion of the ubuntu base, the minimal legacy (32-bit) iso weighs in at just over 750 mb = too big for a cd.
the first suggestion to be offered was booting the iso straight from grub either from a usb or from the root partition (/) itself. i had never heard of such a thing so i asked if the image needed to be written to the usb with dd or a program like etcher. if that were so, i wasn’t seeing how that was different from trying to boot the usb itself. the response was that the iso is just copied to either of those locations.
the magic (at least it seemed like it to me at the time) was creating a bootable grub 2 menu entry that pointed to the iso. i tried the one given at lq but it failed to boot for me. it seemed like it began to read the iso, but then i got some kind of kernel panic from trying to boot from both a usb and / a couple different times.
frustrated, i went back to the board to see if i could get some help fixing what was wrong. then i saw the link below that was posted to help guide anyone with questions about the how of it all. the menu entry there was a bit different so i ended up with:
menuentry "bodhi 5.0.0 iso" {
set isofile="/bodhi-5.0.0-legacy.iso"
loopback loop (hd0,1)$isofile
linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=$isofile noprompt noeject
initrd (loop)/casper/initrd.lz
}
i mounted the iso first via the instructions on the link below to make sure the vmlinuz and initrd.lz files were correct. they were, but in the initial entry suggestion initrd had a .gz file extension so this step saved me from messing up that line. as well, later when i got around to installing lubuntu (both lxde and lxqt) with the same method, it helped me see that initrd didn’t have a file extension in that iso. eventually i copied the iso to /.
i added the menu entry to the very end of my /boot/grub/grub.cfg file (even though that file explicitly warns [“DO NOT EDIT THIS FILE”] against doing so!) as suggested in the lq post even though the ubuntu.com article recommended other locations. i felt like that saved me a few steps in the long run. i did make a system backup with clonezilla before the adding and testing the entry just in case that borked everything.
sure enough the next boot gave me an option at the bottom of my grub menu to boot the iso and it did so. i went ahead and chose to install since the original question was about installation instead of just booting.
after choosing my third partition to install on, i got a warning that the system would need to unmount the disk to rewrite the partition table. i wasn’t sure what to do there since i figured the disk had to be mounted to read the isofile. neither choosing to continue with the install (let the system unmount the disk) or pressing the back button got me any farther down the road so i had to kill ubiquity from the terminal.
luckily ubuntu.com had that one covered as well. a simple sudo umount -l -r -f /isodevice
took care of business and the next attempt at install was successful.
i didn’t go back to make sure the same method worked with a usb as stated in the orinal lq response. i figured if it would read and write from /, getting the system to do the same from a usb (by switching the loopback loop to (hd1,1)) should be easy enough (if not redundant). i tested the system a couple more times with lubuntu just because i was interested in seeing them in action.
learning how to get there took a bit of time and it took me a few days to decide i wanted to do so, but in the end i was able to do the second lubuntu install easily. i figure this method is comparably easier (provided a system with grub 2 already exists) to dd’ing an image and then switching boot devices when all is said and done.
i am adding this to the ubuntu category because all three of my installs so far have been either ubuntu flavors or ubuntu based. i still want to try installing debian and antiX on my 32-bit machine just to see how their speed and weight compare. if those work with the same or similar method i will look to switching categories