-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakeImage_cn.sh
33 lines (31 loc) · 1.4 KB
/
MakeImage_cn.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
: 'Copyright (c) 2024 Jex Zucker
Debian-System-in-Kindle is licensed under Mulan PubL v2.
You can use this software according to the terms and conditions of the Mulan PubL v2.
You may obtain a copy of Mulan PubL v2 at:
http://license.coscl.org.cn/MulanPubL-2.0
THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
See the Mulan PubL v2 for more details.
'
#!/bin/bash
# This script will generate a Debian image to be put on the Kindle
echo "Debian Image Maker 0.2.3 by jex"
echo "REDDIT EDITION - I have modified the"
echo "script to be a bit more self contained."
echo
echo "[*] Making Debian image for Kindle..."
echo "[*] Creating Image File (THIS WILL TAKE A WHILE)..."
dd if=/dev/zero of=debian.ext3 bs=1M count=1024
echo "[*] Making ext3 Filesystem..."
mkfs.ext3 debian.ext3
tune2fs -i 0 -c 0 debian.ext3
echo "[*] Mounting Filesystem..."
sudo mkdir /mnt/debian
sudo mount -o loop -t ext3 debian.ext3 /mnt/debian
echo "[*] Installing Debian using debootstrap (THIS WILL TAKE A WHILE)..."
sudo debootstrap --arch=armel --foreign testing /mnt/debian http://mirrors.ustc.edu.cn/debian/
echo "[*] Unmounting image and removing mountpoint..."
sudo umount /mnt/debian
sudo rmdir /mnt/debian
echo "[*] Image generation complete, you can now copy debian.ext3 to the Kindle..."