Fix examples of how to create VM images #22

Merged
josch merged 5 commits from gioele/mmdebstrap:docs-fix-vm-creation into main 2 years ago
gioele commented 2 years ago

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.
josch commented 2 years ago
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?
gioele commented 2 years ago
Poster

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 2 years ago
josch commented 2 years ago
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!
josch commented 2 years ago
Owner

And welcome to the list of contributors. :)

fe87c3a1b8

And welcome to the list of contributors. :) fe87c3a1b8add686095528e507aafb41810a901a
gioele deleted branch docs-fix-vm-creation 2 years ago
The pull request has been merged as 5fa2457fd5.
You can also view command line instructions.

Step 1:

From your project repository, check out a new branch and test the changes.
git checkout -b gioele-docs-fix-vm-creation main
git pull docs-fix-vm-creation

Step 2:

Merge the changes and update on Gitea.
git checkout main
git merge --no-ff gioele-docs-fix-vm-creation
git push origin main
Sign in to join this conversation.
No reviewers
No Label
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
Loading…
There is no content yet.