1
0
Fork 0
mirror of https://github.com/hermitcore/libhermit.git synced 2025-03-30 00:00:15 +01:00

Updated Boot HermitCore from a raw image (markdown)

Stefan Lankes 2017-05-28 18:00:09 +02:00
parent c84c07b4e3
commit 92604013f1

@ -41,4 +41,25 @@ $ 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.
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. Now, we are able to format our partition.
```bash
$ sudo mke2fs /dev/loop2
mke2fs 1.42.13 (17-May-2015)
Discarding device blocks: done
Creating filesystem with 50176 1k blocks and 12544 inodes
Filesystem UUID: 86d1e2f7-35a9-42b9-89e3-8386e63fd0f4
Superblock backups stored on blocks:
8193, 24577, 40961
Allocating group tables: done
Writing inode tables: done
Writing superblocks and filesystem accounting information: done
``
Afterwards, we are able to mount the partition and to install grub.
```bash
$ sudo mount /dev/loop2 /mnt
$ sudo grub-install --root-directory=/mnt --no-floppy --modules="normal part_msdos ext2 multiboot biosdisk" /dev/loop1
```