<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-gb">
	<link rel="self" type="application/atom+xml" href="https://forum.stereopi.com/app.php/feed/topic/900" />

	<title>StereoPi Forum</title>
	<subtitle>StereoPi Forum</subtitle>
	<link href="https://forum.stereopi.com/index.php" />
	<updated>2020-06-13T20:36:34+00:00</updated>

	<author><name><![CDATA[StereoPi Forum]]></name></author>
	<id>https://forum.stereopi.com/app.php/feed/topic/900</id>

		<entry>
		<author><name><![CDATA[stereomaton]]></name></author>
		<updated>2020-06-13T20:36:34+00:00</updated>

		<published>2020-06-13T20:36:34+00:00</published>
		<id>https://forum.stereopi.com/viewtopic.php?p=2069#p2069</id>
		<link href="https://forum.stereopi.com/viewtopic.php?p=2069#p2069"/>
		<title type="html"><![CDATA[Re: Mounting image to check original parameters]]></title>

		
		<content type="html" xml:base="https://forum.stereopi.com/viewtopic.php?p=2069#p2069"><![CDATA[
Nice proposition.<br>I always forget that losetup can do this out of the box now. A few years ago, doing it with a multi-partition image was a nightmare (needed special kernel configuration if I remember well).<br>Sure it is far easier with your way.<p>Statistics: Posted by <a href="https://forum.stereopi.com/memberlist.php?mode=viewprofile&amp;u=101">stereomaton</a> — Sat Jun 13, 2020 8:36 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[stereomii]]></name></author>
		<updated>2020-06-13T17:26:30+00:00</updated>

		<published>2020-06-13T17:26:30+00:00</published>
		<id>https://forum.stereopi.com/viewtopic.php?p=2068#p2068</id>
		<link href="https://forum.stereopi.com/viewtopic.php?p=2068#p2068"/>
		<title type="html"><![CDATA[Re: Mounting image to check original parameters]]></title>

		
		<content type="html" xml:base="https://forum.stereopi.com/viewtopic.php?p=2068#p2068"><![CDATA[
Stereomaton, you inspired me to a little quest to handle image files.<br><br>After "burning" image to a SD card it was up till now rather impossible for me to create a small image for backup from my system. I mostly use 16Gb cards and with W32Imager I get a 16 Gb image, using too much space and too much time for burning.<br><br>I found losetup to be very usefull.<br><div class="codebox"><p>Code: </p><pre><code>root@raspi# losetup -f -D image.img</code></pre></div>will allocate the image to the first free loop device (usually /dev/loop0) and search for a partition table, resulting in f.e.<div class="codebox"><p>Code: </p><pre><code>root@raspi:/media/pi# ls -l /dev/loop0*brw-rw---- 1 root disk   7, 0 jun 13 18:45 /dev/loop0brw-rw---- 1 root disk 259, 0 jun 13 18:45 /dev/loop0p1brw-rw---- 1 root disk 259, 1 jun 13 18:45 /dev/loop0p2brw-rw---- 1 root disk 259, 2 jun 13 18:45 /dev/loop0p3</code></pre></div>After this you can mount the partitions (/dev/loop0p1 etc.) just like a regular disk, inspect and change files etc.<br><br>You can even do a parted or gparted to delete the 3rd FAT32 partition<br><div class="codebox"><p>Code: </p><pre><code>gparted /dev/loop0</code></pre></div>fdisk -l /dev/loop0 shows the layout<br><div class="codebox"><p>Code: </p><pre><code>root@raspi:/media/pi# fdisk -l /dev/loop0Disk /dev/loop0: 14,5 GiB, 15523119104 bytes, 30318592 sectorsUnits: sectors of 1 * 512 = 512 bytesSector size (logical/physical): 512 bytes / 512 bytesI/O size (minimum/optimal): 512 bytes / 512 bytesDisklabel type: dosDisk identifier: 0xb41d5468Device       Boot   Start      End  Sectors  Size Id Type/dev/loop0p1         8192    98045    89854 43,9M  c W95 FAT32 (LBA)/dev/loop0p2        98304  8484863  8386560    4G 83 Linux/dev/loop0p3      8484864 30318591 21833728 10,4G  b W95 FAT32</code></pre></div>(partition 3 not yet deleted here), you see the last block (8484863) of the (p2) / partiton, if p3 was deleted a<div class="codebox"><p>Code: </p><pre><code>dd if=image.img of=image-minimal.img bs=512 count=8484863 </code></pre></div>(just for sure  <img class="smilies" src="https://forum.stereopi.com/images/smilies/icon_e_wink.gif" width="15" height="17" alt=";)" title="Wink">  I take a few more blocks for count), gives me a minimal sized image. All without arithmetic, always nice for a mathematician.<br><br>do not forget to umount the partitions and do a<div class="codebox"><p>Code: </p><pre><code>losetup -D</code></pre></div>to disconnect the loop devices.<br><br>I used raspbian stretch for this.<br>Indeed, Linux is fantastic.<p>Statistics: Posted by <a href="https://forum.stereopi.com/memberlist.php?mode=viewprofile&amp;u=93">stereomii</a> — Sat Jun 13, 2020 5:26 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Realizator]]></name></author>
		<updated>2020-03-29T13:19:18+00:00</updated>

		<published>2020-03-29T13:19:18+00:00</published>
		<id>https://forum.stereopi.com/viewtopic.php?p=1806#p1806</id>
		<link href="https://forum.stereopi.com/viewtopic.php?p=1806#p1806"/>
		<title type="html"><![CDATA[Re: Mounting image to check original parameters]]></title>

		
		<content type="html" xml:base="https://forum.stereopi.com/viewtopic.php?p=1806#p1806"><![CDATA[
Hi Stereomaton,<br>Thank you for your tip! I will add it to our Wiki.<br>By the way, under MacOS I mount RPi images using Paragon extFS for Mac. It also helps me to avoid recording of the image to the card to access some code and default settings.<br>UPD&gt; We use "contrast=-15" as a default, but may be "0" is a good option. "-15" comes from our first experiments in a low light conditions.<p>Statistics: Posted by <a href="https://forum.stereopi.com/memberlist.php?mode=viewprofile&amp;u=2">Realizator</a> — Sun Mar 29, 2020 1:19 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[stereomaton]]></name></author>
		<updated>2020-03-27T15:56:17+00:00</updated>

		<published>2020-03-27T15:56:17+00:00</published>
		<id>https://forum.stereopi.com/viewtopic.php?p=1799#p1799</id>
		<link href="https://forum.stereopi.com/viewtopic.php?p=1799#p1799"/>
		<title type="html"><![CDATA[Mounting image to check original parameters]]></title>

		
		<content type="html" xml:base="https://forum.stereopi.com/viewtopic.php?p=1799#p1799"><![CDATA[
Today, I wanted to get the default parameters of StereoPi.<br>I downloaded the image file and here is a tip to avoid to burn it, thanks to Linux.<br><br>With fdisk, we can get the organisation of the partitions in the image:<div class="codebox"><p>Code: </p><pre><code>$ fdisk -l stereopi-0-2-3.img Disk stereopi-0-2-3.img: 1.9 GiB, 2013265920 bytes, 3932160 sectorsUnits: sectors of 1 * 512 = 512 bytesSector size (logical/physical): 512 bytes / 512 bytesI/O size (minimum/optimal): 512 bytes / 512 bytesDisklabel type: dosDisk identifier: 0xb41d5468Device              Boot Start     End Sectors  Size Id Typestereopi-0-2-3.img1       8192   98045   89854 43.9M  c W95 FAT32 (LBA)stereopi-0-2-3.img2      98304 3932159 3833856  1.8G 83 Linux</code></pre></div>Here, the first partition starts at sector 8192 and a sector is 512 bytes. Man can compute the offset: 8192*512=4194304<br><br>Now, mount the partition as this (after having created an empty /tmp/stereopi_fat/ directory):<div class="codebox"><p>Code: </p><pre><code>sudo mount -o loop,offset=4194304 stereopi-0-2-3.img /tmp/stereopi_fat/</code></pre></div>And voilà, you have access to the data written in the image in the specified directory without having to burn it for real.<br>Linux is fantastic.<br><br>You can unmount as usual: <div class="codebox"><p>Code: </p><pre><code>sudo umount /tmp/stereopi_fat/</code></pre></div><br>By the way, here is the default configuration stereopi.conf I searched for:<blockquote class="uncited"><div>video_width=1280<br>video_mode=3D<br>video_height=720<br>video_fps=30<br>video_bitrate=3000000<br>video_profile=baseline<br>rtmp_url=<br>rtmp_enabled=0<br>mpegts_clients=192.168.1.10:3001<br>mpegts_enabled=0<br>rtsp_enabled=0<br>usb_enabled=1<br>audio_enabled=0<br>video_wb=auto<br>exposure=auto<br>contrast=-15<br>sharpness=0<br>digitalgain=0.0<br>wifi_iface=<br>wifi_ssid=<br>wifi_psk=<br>record_enabled=0<br>record_time=300<br>dec_enabled=0<br>up_down=0<br>udp_clients=192.168.1.10:3000<br>udp_enabled=0<br>ws_enabled=0</div></blockquote><p>Statistics: Posted by <a href="https://forum.stereopi.com/memberlist.php?mode=viewprofile&amp;u=101">stereomaton</a> — Fri Mar 27, 2020 3:56 pm</p><hr />
]]></content>
	</entry>
	</feed>
