tag:blogger.com,1999:blog-3993498847203183398.post1663353051376743619..comments2024-03-18T12:28:29.902+00:00Comments on RevK<sup>®</sup>'s ramblings: Making pre-loaded Raspberry Pi imageRevKhttp://www.blogger.com/profile/12369263214193333422noreply@blogger.comBlogger13125tag:blogger.com,1999:blog-3993498847203183398.post-12692428266421762962018-01-11T14:10:03.235+00:002018-01-11T14:10:03.235+00:00It's usually not the actual SD-card that break...It's usually not the actual SD-card that breaks, brownouts and violent shutdowns seem to make the Pi write garbage to the card, effectively corrupting the filesystem.Anonymoushttps://www.blogger.com/profile/18048225692654341124noreply@blogger.comtag:blogger.com,1999:blog-3993498847203183398.post-44721175089671990182018-01-07T01:13:04.642+00:002018-01-07T01:13:04.642+00:00kpartx really works at a level above losetup.
It ...kpartx really works at a level above losetup.<br /><br />It can create device mapper entries for all partitions in an image, that you then only need mount, no need to do the losetup stuff yourself (though it does use loop devices underneath)<br /><br />e.g<br /><br />kpartx -a disk.img<br /><br />will create /dev/dm-* files for each partition and lvm volume group it finds. These can then simply be mounted etc.Andrew Claytonhttps://www.blogger.com/profile/15690989157183631976noreply@blogger.comtag:blogger.com,1999:blog-3993498847203183398.post-34111010329550771382018-01-06T13:27:38.417+00:002018-01-06T13:27:38.417+00:00Which is exacttly what losetup does.Which is exacttly what losetup does.Mark Morgan Lloydnoreply@blogger.comtag:blogger.com,1999:blog-3993498847203183398.post-28809268287093083042018-01-06T13:06:34.286+00:002018-01-06T13:06:34.286+00:00We prefer running Debian (Sjoerd Simons, Collabora...We prefer running Debian (Sjoerd Simons, Collabora) rather than Raspbian, since at least in the early days grafting KDE onto it with decent large-screen support was a problem. You'll always need a small Raspbian filesystem at the start so that you can get low-level firmware updates, their pukka kernel, and the all-important vcgencmd program and support libraries.<br /><br />xl2tpd runs fairly well but you need to compile it to not use kernel facilities. I passed that on to your support people a year or so ago but it never got to the relevant bit on your website.<br />Mark Morgan Lloydnoreply@blogger.comtag:blogger.com,1999:blog-3993498847203183398.post-49951992418386476832018-01-05T21:41:04.875+00:002018-01-05T21:41:04.875+00:00Similarly, there's kpartx which will make your...Similarly, there's kpartx which will make your disk image behave like a normal disk, enabling you to mount partitions without manually sorting out offsets and what have you.Johnhttps://www.blogger.com/profile/17555396036856701009noreply@blogger.comtag:blogger.com,1999:blog-3993498847203183398.post-51455390653843383772018-01-05T16:13:19.731+00:002018-01-05T16:13:19.731+00:00you can also use 'losetup' to attach an im...you can also use 'losetup' to attach an image as a partitioned disk - so that you get a bunch of devices appearing, one for the disk and one for each partition. Use losetup --partscan and then mount the individual partitions.Ben Cliffordhttps://www.blogger.com/profile/14671623393202560568noreply@blogger.comtag:blogger.com,1999:blog-3993498847203183398.post-7841207733227907592018-01-05T15:56:29.242+00:002018-01-05T15:56:29.242+00:00FYI, there's an easy way to mount multi-partit...FYI, there's an easy way to mount multi-partition images using the kpartx command rather than calculating offsets - see this post:<br />https://askubuntu.com/questions/445979/how-to-mount-sd-card-image-created-with-dd/446022#446022<br />Anonymoushttps://www.blogger.com/profile/00105039760722310877noreply@blogger.comtag:blogger.com,1999:blog-3993498847203183398.post-84476002539213213762018-01-05T13:13:43.415+00:002018-01-05T13:13:43.415+00:00Yes, I see what you mean now, D'Oh.Yes, I see what you mean now, D'Oh.RevKhttps://www.blogger.com/profile/12369263214193333422noreply@blogger.comtag:blogger.com,1999:blog-3993498847203183398.post-31067193219646478162018-01-05T12:15:19.767+00:002018-01-05T12:15:19.767+00:00Why not just eject and reinsert the SD card, as /b...Why not just eject and reinsert the SD card, as /boot is FAT32, it should auto mount...Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-3993498847203183398.post-1691200046441120122018-01-05T12:04:35.836+00:002018-01-05T12:04:35.836+00:00It's been a while since I played with my RPi b...It's been a while since I played with my RPi but if the number of write-cycles bothers you there's always the rasberrypi version of Tiny Core Linux, http://forum.tinycorelinux.net/index.php?board=57.0.<br /><br />IIRC after booting it doesn't touch the SD card. You can also create your own distro with the apps you want to create an embedded device. An example of this is PiCorePlayer, https://sites.google.com/site/picoreplayer/home.<br /><br />There's also a community of bare metal programmers for the RPi which I've dabbled with myself, https://github.com/dwelch67/raspberrypi. However not all specs are made available and this has been a source of consternation between the programmers and the RPi foundation.ContextSwitchhttps://www.blogger.com/profile/02055385944215236099noreply@blogger.comtag:blogger.com,1999:blog-3993498847203183398.post-82293436922792703882018-01-05T09:35:45.255+00:002018-01-05T09:35:45.255+00:00Isn’t that exactly what is said?Isn’t that exactly what is said?RevKhttps://www.blogger.com/profile/12369263214193333422noreply@blogger.comtag:blogger.com,1999:blog-3993498847203183398.post-1894765715651622632018-01-05T09:18:34.303+00:002018-01-05T09:18:34.303+00:00Useful summary, Revk.
There is a handy shortcut t...Useful summary, Revk.<br /><br />There is a handy shortcut to getting ssh control of a new, headless RaspberryPi ... after making the new SD card image you can 'touch /boot/ssh'. If /boot/ssh file (with no or any contents) exists at boot, sshd will be enabled when the Pi boots.<br /><br />(And if you want wireless connectivity, /boot/wpa_supplicant will be moved into /etc to pass the relevant wifi config.)<br /><br />Simon.Simon Pooleyhttps://www.blogger.com/profile/10725435409233343679noreply@blogger.comtag:blogger.com,1999:blog-3993498847203183398.post-40295693324001661922018-01-05T09:18:22.788+00:002018-01-05T09:18:22.788+00:00Don't forget you can now ditch the card and bo...Don't forget you can now ditch the card and boot your rpi3 from a usb mass storage device by setting a permanent efuse option<br /><br />https://www.youtube.com/watch?v=ubnwvxF3Klc<br />Chrisnoreply@blogger.com