diff --git a/Boot-HermitCore-from-a-raw-image.md b/Boot-HermitCore-from-a-raw-image.md index 9ef34b7..2c75c0b 100644 --- a/Boot-HermitCore-from-a-raw-image.md +++ b/Boot-HermitCore-from-a-raw-image.md @@ -32,4 +32,13 @@ The partition table has been altered. Syncing disks ``` -Afterwards, we have to setup two loop devices. One will be used for writing GRUB and its additional codes to MBR, and the second will be used for mounting filesystem of your operating system. \ No newline at end of file +Afterwards, we have to setup two loop devices. One will be used for writing GRUB and its additional codes to MBR, and the second will be used for mounting filesystem of your operating system. + +```bash +$ sudo losetup --find --show stream.raw +/dev/loop1 +$ sudo losetup --find --show -o 1048576 stream.raw +/dev/loop2 +``` + +The option `-o` defines the offset from start of the file. The offset 1048576 is actually 1024^2 = 1MB and that's the start of our partition. \ No newline at end of file