Fix examples of how to create VM images #22

Merged
josch merged 5 commits from gioele/mmdebstrap:docs-fix-vm-creation into main 2022-02-14 06:45:31 +00:00
Contributor

VM images created using the two examples contained in the "man page" of mmdebstrap do not boot (or cannot be generated at all in certain cases).

This PR aligns the two examples (so that both contain the same instructions formatted in the same way) and fixs the instructions to build the images.

VM images created using the two examples contained in the "man page" of mmdebstrap do not boot (or cannot be generated at all in certain cases). This PR aligns the two examples (so that both contain the same instructions formatted in the same way) and fixs the instructions to build the images.
gioele added 5 commits 2022-02-13 19:29:07 +00:00
Write the same `guestfish` instructions in the same way in both the
`autopkgtest-build-qemu` and the "Debian desktopn on a USB stick" example.
`/usr/lib/SYSLINUX` is not available if only `extlinux` is installed.
The generated image will not be bootable if `mbr.bin` is not installed
into the MBR.

These lines are copied from the "Debian desktop on USB stick" example.
Owner

Thank you for your contribution!

Can you explain which of your five changes is the one that is necessary so that it boots for you?

The instructions definitely work over here and I used the same steps in the autopkgtest of sbuild, libguestfs, genext2fs and dropbear:

And those scripts work just fine. Do you know why it didn't work for you?

For example you replaced /usr/lib/SYSLINUX/mbr.bin with /usr/lib/EXTLINUX/mbr.bin but those two files are identical:

$ md5sum /usr/lib/SYSLINUX/mbr.bin /usr/lib/EXTLINUX/mbr.bin
8cb37afc263a219ebb7586f9c495114e  /usr/lib/SYSLINUX/mbr.bin
8cb37afc263a219ebb7586f9c495114e  /usr/lib/EXTLINUX/mbr.bin

Can you add more context?

Thank you for your contribution! Can you explain which of your five changes is the one that is necessary so that it boots for you? The instructions definitely work over here and I used the same steps in the autopkgtest of sbuild, libguestfs, genext2fs and dropbear: - https://codesearch.debian.net/show?file=sbuild_0.83.0%2Fdebian%2Ftests%2Funshare-qemuwrapper&line=148 - https://codesearch.debian.net/show?file=genext2fs_1.5.0-2%2Fdebian%2Ftests%2Fgeneral&line=29 - https://sources.debian.org/src/libguestfs/1%3A1.46.2-11/debian/tests/extlinux/ And those scripts work just fine. Do you know why it didn't work for you? For example you replaced `/usr/lib/SYSLINUX/mbr.bin` with `/usr/lib/EXTLINUX/mbr.bin` but those two files are identical: ``` $ md5sum /usr/lib/SYSLINUX/mbr.bin /usr/lib/EXTLINUX/mbr.bin 8cb37afc263a219ebb7586f9c495114e /usr/lib/SYSLINUX/mbr.bin 8cb37afc263a219ebb7586f9c495114e /usr/lib/EXTLINUX/mbr.bin ``` Can you add more context?
Author
Contributor

The explanations are in the commit messages. :)

But let me recap:

  1. The second example did not have copy-file-to-device /boot/mbr.bin /dev/sda size:440 thus no boot loader, thus it did not boot.

  2. If you install only extlinux and not syslinux, the directory /usr/bin/SYSLINUX does not exist. (Debian 11)

  3. ext4 because ext2 does not support TRIM/DISCARD.

  4. Identical instruction text in both examples so that it's easier to spot that the VM creation phases are not different.

The explanations are in the commit messages. :) But let me recap: 1. The second example did not have `copy-file-to-device /boot/mbr.bin /dev/sda size:440` thus no boot loader, thus it did not boot. 2. If you install only `extlinux` and not `syslinux`, the directory `/usr/bin/SYSLINUX` does not exist. (Debian 11) 3. ext4 because ext2 does not support TRIM/DISCARD. 4. Identical instruction text in both examples so that it's easier to spot that the VM creation phases are not different.
josch merged commit 5fa2457fd5 into main 2022-02-14 06:45:31 +00:00
Owner

Whoops, indeed I missed the button with the three dots which shows the full commit message and I was thus only reading the first line in the webinterface.

Thank you!

Whoops, indeed I missed the button with the three dots which shows the full commit message and I was thus only reading the first line in the webinterface. Thank you!
Owner

And welcome to the list of contributors. :)

fe87c3a1b8

And welcome to the list of contributors. :) fe87c3a1b8add686095528e507aafb41810a901a
gioele deleted branch docs-fix-vm-creation 2022-02-14 14:04:56 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: josch/mmdebstrap#22
No description provided.