# Custom D.E.O.T. V1.0+/Clockwork OS v0.4 image - With Updated Kernel 5.3.6, Latest Lima Drivers, RA1.8.1, Mupen64+ and much more! (Current version: 191122)

**URL:** <https://forum.clockworkpi.com/t/custom-d-e-o-t-v1-0-clockwork-os-v0-4-image-with-updated-kernel-5-3-6-latest-lima-drivers-ra1-8-1-mupen64-and-much-more-current-version-191122/4742>\
**Category:** Firmware and Apps\
**Tags:** community, os, launcher, retroarch, development\
**Created:** [October 19, 2019, 4:56am UTC](https://forum.clockworkpi.com/t/custom-d-e-o-t-v1-0-clockwork-os-v0-4-image-with-updated-kernel-5-3-6-latest-lima-drivers-ra1-8-1-mupen64-and-much-more-current-version-191122/4742 "2019-10-19T04:56:56Z")\
**Posts on this page:** 1\
**Showing post:** 45

<div class="post-metadata">

**Author:** ![guu](https://avatars.discourse-cdn.com/v4/letter/g/7ab992/32.png) [@guu](https://forum.clockworkpi.com/u/guu)\
**Post date:** [November 14, 2019, 12:20am UTC](https://forum.clockworkpi.com/t/custom-d-e-o-t-v1-0-clockwork-os-v0-4-image-with-updated-kernel-5-3-6-latest-lima-drivers-ra1-8-1-mupen64-and-much-more-current-version-191122/4742/45 "2019-11-14T00:20:15Z")

</div>

ok

take the deot\_v1+ 191111.img as example

First use [https://github.com/Drewsif/PiShrink](https://github.com/Drewsif/PiShrink) to do a simple shrink  
`sudo pishrink.sh -s deot_v1+\ 191111.img`  
that will shrink your image to be like 6.8G ,don’t forget the **-s** , without **-s** , it will add raspberrypi’s auto\_expand into the **/etc/rc.local**

then follow the instructions [https://gist.github.com/cuu/b11109f2197cd482fe8d2c61b8d409c6](https://gist.github.com/cuu/b11109f2197cd482fe8d2c61b8d409c6)  
to add the expander into the img

```auto
sudo mount -o loop,offset=48234496 deot_v1+\ 191111.img /media/sdb2/
cd /media/sdb2/etc/init.d
sudo wget https://gist.githubusercontent.com/cuu/b11109f2197cd482fe8d2c61b8d409c6/raw/672971991633283eaf8cdc0263a99472371b508d/expand_rootfs
sudo chmod +x expand_rootfs 
cd ../rc3.d/
sudo ln -s ../init.d/expand_rootfs S01expand_rootfs
cd && sudo umount /media/sdb2

```

last is little bit complex  
use **losetup** to setup the img to a loop device, then dd a zero file to fill the unused space with zero and delete it in the last

here is what I did

```auto
sudo mkdir /mnt/p2
sudo losetup -P /dev/loop21 deot_v1+\ 191111.img
sudo mount /dev/loop21p2 /mnt/p2/
sudo dd if=/dev/zero of=/mnt/p2/zero
sudo rm /mnt/p2/zero
sudo umount /mnt/p2/
sudo losetup -d /dev/loop21

```

under your **/dev** ,there are a lot of loop devices, like loop1 loop2…  
just find loop+number not existed under /dev, in my computer , I choose **loop21**

the **/mnt/p2** is a mount folder I create for mounting, you can chose whatever the name you want  
just make sure it’s an empty folder, same as the **/media/sdb2** above

PS  
it took 6 hours to download your image here, so your network is fast 🙂

---

_[View the full topic](https://forum.clockworkpi.com/t/custom-d-e-o-t-v1-0-clockwork-os-v0-4-image-with-updated-kernel-5-3-6-latest-lima-drivers-ra1-8-1-mupen64-and-much-more-current-version-191122/4742)._
