boot/grub2/readme.txt: fix loopback mount notes

Commit 7dd56b6cd9 ("boot/grub2/readme.txt: don't specify /dev/loop0")
changed the description of the loopback mounting to use losetup -f <img>,
but forgot to add the --show option, causing losetup to not print the
loopback device name.

Fix that by adding the --show option.

Signed-off-by: Cherniaev Andrei <dungeonlords789@naver.com>
[Peter: Reword commit message]
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
This commit is contained in:
Cherniaev Andrei 2025-05-17 00:08:28 +09:00 committed by Peter Korsgaard
commit a480ae9ffe

View file

@ -10,7 +10,7 @@ Notes on using Grub2 for BIOS-based platforms
is enough free space *before* the first partition to
store Grub2. Leaving 1 MB of free space is safe.
3. Setup loop device and loop partitions
loop_dev=$(sudo losetup -f disk.img)
loop_dev=$(sudo losetup -f --show disk.img)
sudo partx -a "$loop_dev"
4. Prepare the root partition
sudo mkfs.ext3 -L root "${loop_dev}p1"
@ -65,7 +65,7 @@ Notes on using Grub2 for x86/x86_64 EFI-based platforms
- Create a second partition, type 8300, for the root
filesystem.
3. Setup loop device and loop partitions
loop_dev=$(sudo losetup -f disk.img)
loop_dev=$(sudo losetup -f --show disk.img)
sudo partx -a "$loop_dev"
4. Prepare the boot partition
sudo mkfs.vfat -n boot "${loop_dev}p1"