Alpine Linux in a qemu VM .... how to set boot parameters?

Probably need to resize .png file before I post!!! About the only thing I want from Alpine is a package list for LFS!!!

1 Like

I always put the text in separately… directly into the discourse edit window.

You want to make LFS like alpine… busybox and all?
Apk will do you a package list… be careful with package names… they vary across distros.

2 Likes

I did your test.

cp MyAlpine.iso MyAlpinehybrid.iso
isohybrid MyAlpinehybrid.iso
file MyAlpinehybrid.iso
MyAlpinehybrid.iso: ISO 9660 CD-ROM filesystem data (DOS/MBR boot sector) 'MyAlpine.iso' (bootable)

So MyAlpinehybrid.iso now has the (DOS/MBR boot sector)

I copied each to a USB drive

  • MyAlpine.iso will not boot
  • MyAlpinehybrid.iso will boot

Either will boot if put on a CD, or if used with a virtual CDROM in qemu or virt-manager.

SUMMARY (for those who may be trying to follow this arcane discussion)

  1. If you make an .iso file with mkisofs (or Xorriso) without the -b and -c parameters it will be a data iso file and will not boot
  2. If you make an .iso file with mkisofs (or Xorriso) with the -b and -c parameters it will be bootable if you copy it to a CD/DVD or if you boot it in a VM with a virtual CD drive., but it will not be bootable if copied to a USB drive.
  3. If you use isohybrid on the .iso file from 2. it will acquire an MBR boot sector. It will then be bootable either from a CD or from an USB drive.

The type of .iso file obtained in 3. is called a hybrid .iso. file.
Most Linux distros come as a hybrid .iso file. Windows comes as non-hybrid .iso file.( or at least it used to when I last looked)

The way to tell what type of .iso file you have is to use the file statement

 $ file *.iso
alpine-standard-3.22.1-x86_64.iso:       ISO 9660 CD-ROM filesystem data (DOS/MBR boot sector) 'alpine-std 3.22.1 x86_64' (bootable)
MyAlpinehybrid.iso:                      ISO 9660 CD-ROM filesystem data (DOS/MBR boot sector) 'MyAlpine.iso' (bootable)
MyAlpine.iso:                            ISO 9660 CD-ROM filesystem data 'MyAlpine.iso' (bootable)
void-live-x86_64-musl-20250202-xfce.iso: ISO 9660 CD-ROM filesystem data (DOS/MBR boot sector) 'VOID_LIVE' (bootable)

You can see they are all hybrid .isos, except MyAlpine.iso.

3 Likes

No, Alpine and LFS and even your Void are close relatives!!! LFS expects “glibc” while Alpine is built with “musl” and your Void can be built with either one, perhaps you can explain!!!

Not necessarily the package list, but on how Alpine builds a target package, and this same approach can be used to build LFS. For instance: “xorg-server” It had “something like” 99 packages to build, 98 packages were built as dependencies, before the target package “xorg-server”. Just one more thing I am learning about how to build LFS!!!

Not even VirtualBox will boot from a thumb drive but will boot from a cd, do not ask me why!!!

1 Like

You mean glibc versus musl. ?
There is not much difference , to be honest. They are both libraries for compiling C programs. Musl is supposed to be modern and better for minimal distros.
I have both varieties of Void at the moment and I do not notice any difference as a user.

I see…because LFS does not have a package system , you have to make all sorts of compile decisions yourself.,

3 Likes

You mean Vbox will not boot an iso file from a thumb drive?
It will boot from an iso file on disk… and a tbumb drive is just another disk… so why not?.. I think virt-manager would do it as long as the thumb drive were mounted… no, hang on, it would have to be a data thumb drive so vbox could see the .iso file as a file… not a thumb drive made with dd. which only contains the contents of the iso file, not the file itself.
An iso file is like a qcow2 file… a filesystem stored within a file… that is why I used a loop mount to get at the contents.

1 Like

@nevj

Vbox will mount a thumb drive, if you download and install the extension pack, but you either boot from the ISO or from a CD!!!

1 Like

Use boot from an iso
but
make a data usb drive, ie format it to ext, and copy the iso to it with cp.
Then Vbox will see the iso file on the mounted usb drive , the same way it sees it on your hard disk.
You could cp several iso files to that usb drive… just like Ventoy… they would all be bootable by Vbox… but they would not boot as a live USB.

2 Likes

@Daniel_Phillips
I have solved that ny installing Xfce4 in NetBSD.
When I run qemu in NetBSD with the following arguments

 qemu-system-x86_64 -m 512 -nic user  \
  -display sdl,gl=on -boot d \
  -hda alpinevm.qcow2 \
  -cdrom /mnt/share/MyAlpine.iso

I get a large qemu window, but it can be resized to look like this


The text is a tad small, but it is workable.
It is showing the alpine boot.
That will do me. … I can get on with configuring the Alpine VM.

2 Likes

Yep, you can now run “setup alpine”!!! You can input configs or just use defaults!!! I had to use the VBOX “Nat” setting to get Alpine to recognize my dhcp lease. My text was small also!!!

The login for Alpine is “root”!!!

2 Likes

We need to start a new Alpine thread and get away from your solution thread!!! There are some that might benefit, from using Alpine!! Do you want me to start the conversation?

1 Like

It must be Alpine doing that.

I have made another discovery
ctrl alt 3 gives me a serial console in another window… with decent sized text
So I can work there. I dont really need graphics.
also
ctrl alt 2 gives me a ‘monitor’ console in yet another window. I has a (qemu) prompt where I can type commands to qemu… like telling it to save the VM… useful, I wondered how one would save

Will get a picture tomorrow.
This is looking good now… almost as easy as Vbox or Virt-manager

3 Likes

That is well, but since I am working from W11, VirtualBox is my go-to-app!!! I still think we need to start a alpine thread!!!

2 Likes

Well yes, but I want to finish my netbsd task first. Alpine is just a tool for me at moment… a helper to make netbsd do things.

3 Likes

Here is what my screen looks like now


I can work in the serial console, and the monitor console lets me issue commands ( a bit like using the menu in Vbox)
I still have the graphic window if needed

Hang on, we will do Alpine
We both need an install… a VM will do.

2 Likes

1 Like