How to install OS on SD card from Linux?

Thanks for this info.

Just checked dmesg after a reboot, and - as you wrote - my corrupt filesystem from a crash some time ago has been fixed automatically.

Great, Michael

Thanks @olwaldi for the hint. In case of another issue, Iā€™ll try dmseg and fsck. However, at the moment the different SD card with a new installation is working fine.

I wonder, if I can create an image backup with clonezilla? There should be no reason why it wouldnā€™t work. Then I could simply restore system with clonezilla :slight_smile:

It would save me a lot of time of configuring system anew. Making for a first or second time is OK, but if any issues came again, it would be PITA doing the same again. Restoring disc image would be way quicker and easier, especially that the system is not changing so often as a usual PC OS.

Doubtless you could but you might like to try this:

1 Like

I do use dd to create a copy of the running OSMC (or any other OS on the raspi) onto a second sdcard of the same size. To do that I use an USB sdcard reader. Before I start the dd command I ensure to have the running OS as calm as possible (connected by ssh, mediacenter stopped). Again to find the correct device name you can use dmesg - beware to select the correct device.

dd if=/dev/mmcblk0 bs=4M status=progress of=/dev/sdb

Afterwards I do fsck both partitions just written for safety. From within raspi these commands should work (not tested, I do this an my standard linux machine). Again be sure to use the corect device names.

fsck.vfat /dev/sdb1
fsck.ext4 /dev/sdb2

Regards, Michael

Thanks, but I think it will be easier to shut down Rpi3, take out SD, put it into the laptop, and use clonezilla to make an image on my backup HDD. Fewer operations and easier to restore (I recreated my laptop OS when I moved it from one SSD into another, and it worked like a charm).

Your method contains lots of unknowns to me, so itā€™s more risky. Iā€™ll stick to what I know. However, if your dd methods works, Iā€™m sure, clonezilla will work too :slight_smile: .

Or I could use the method that @grahamh recommended here. Less space needed.

Thanks to both of you.