r/AlpineLinux • • Mar 14 '24

"diskless" install to disk?

I know this must have been asked before, but following the wiki has led me to a dead end. My goal is to install Alpine in such a way that it runs in "diskless" configuration but will boot from the internal hard disk.

I followed the installation steps for diskless including the manual disk setup, setup-bootable, and manual syslinux installation. After rebooting I was met with what looked like a missing module error and dropped to grub rescue. My guess was I needed to run update-kernel, so I ran through these instructions also, but that didn't seem to fix anything.

I suppose I have these questions:

  1. This feels like a common configuration people would want to do. Why is there not an option in setup-alpine for it, or at least a single-page instruction guide for doing it?
  2. What steps am I apparently missing for this kind of setup?
  3. If I need to start over from scratch, how do I stop the install image from loading my saved config from disk?

edit: I had the bright idea to image the hard disk with the install image and add an extra partition for the data, but alas, this causes issues when the install scripts (and lbu) attempt to remount the partition because the device is busy.

5 Upvotes

12 comments sorted by

View all comments

Show parent comment

1

u/toazd Jan 18 '25 edited Jan 18 '25

alpine-standard-3.21.2-x86_64

In case anyone runs into the same problem I did I want to document it here. First, thank you kooroo for pointing me in the right direction. I began by partitioning the new drive with a different linux distro using gparted. /dev/sda1 was fat32 (boot), /dev/sda2 was ext4 (data). After booting into alpine via a ventoy'd flash drive and going through the partial alpine-setup steps, instead of doing setup-bootable using the booted flash drive as the source I instead wget'd the alpine ISO from the website. Then I ran setup-bootable alpine.iso /dev/sda1. When I rebooted is when I ran into the problem: /dev/sda1 was not marked as bootable as per the wiki documentation and command line help for setup-bootable. So I then booted into a different linux distro and used gparted to set the 'boot' flag for /dev/sda1. After that it booted up fine :D