Modify Img file #130
Replies: 3 comments 1 reply
-
I've never tried doing it like that. I've no idea if that would work. This is the way I would do it. Download the source then modify ../board/shredos/grub.cfg then build it as described here |
Beta Was this translation helpful? Give feedback.
-
I guess another way, that's similar to how you are trying to do it would be to dd the .img file to a USB stick, edit both grub.cfg files on the USB stick then dd the USB stick back to a modified.img file. To keep the .img file small rather than the size of the USB stick you would need to figure out where the vfat partition ends and tell dd to only copy upto that point. I've never tried it but it should work. |
Beta Was this translation helpful? Give feedback.
-
Thanks for the answers, |
Beta Was this translation helpful? Give feedback.
-
Hello,
Is there a way, for modifying the img file before to copy it on a usb stick ?
I've tried to:
mount -o loop,offset=646656 shredos-2021.08.2_23_x86-64_0.34_20221231.img mount/
Then, modify grub.cfg in the boot, and EFI directory (as said in the documentation)
umount /mount
and finally dd if=shredos-2021.08.2_23_x86-64_0.34_20221231.img of=/dev/sda1
But it looks like the modification brooked grub
The usb stick, does not boot and I get only a grub prompt.
Is there anything else that i can do before doing the dd ?
Thanks a lot for your help
Beta Was this translation helpful? Give feedback.
All reactions