<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="https://wiki.radxa.com/mw/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://wiki.radxa.com/mw/index.php?action=history&amp;feed=atom&amp;title=Rockpi4%2Fdev%2Frootfs</id>
		<title>Rockpi4/dev/rootfs - Revision history</title>
		<link rel="self" type="application/atom+xml" href="https://wiki.radxa.com/mw/index.php?action=history&amp;feed=atom&amp;title=Rockpi4%2Fdev%2Frootfs"/>
		<link rel="alternate" type="text/html" href="https://wiki.radxa.com/mw/index.php?title=Rockpi4/dev/rootfs&amp;action=history"/>
		<updated>2026-06-13T22:13:32Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.23.3</generator>

	<entry>
		<id>https://wiki.radxa.com/mw/index.php?title=Rockpi4/dev/rootfs&amp;diff=9182&amp;oldid=prev</id>
		<title>Nascs: Created page with &quot;=== build deban11 armhf image with a existed image ===  1.  build armhf debian11 rootfs  # to install tool  sudo apt install -y debootstrap  # create folder rootfs  mkdir root...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.radxa.com/mw/index.php?title=Rockpi4/dev/rootfs&amp;diff=9182&amp;oldid=prev"/>
				<updated>2023-01-30T07:51:18Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;quot;=== build deban11 armhf image with a existed image ===  1.  build armhf debian11 rootfs  # to install tool  sudo apt install -y debootstrap  # create folder rootfs  mkdir root...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;=== build deban11 armhf image with a existed image ===&lt;br /&gt;
&lt;br /&gt;
1.  build armhf debian11 rootfs&lt;br /&gt;
 # to install tool&lt;br /&gt;
 sudo apt install -y debootstrap&lt;br /&gt;
 # create folder rootfs&lt;br /&gt;
 mkdir rootfs &amp;amp;&amp;amp; cd rootfs&lt;br /&gt;
 # building rootfs&lt;br /&gt;
 sudo debootstrap --arch armhf bullseye rootfs http://mirrors.tuna.tsinghua.edu.cn/debian&lt;br /&gt;
 sudo chroot rootfs bash&lt;br /&gt;
 # to install the packages you need&lt;br /&gt;
 apt update&lt;br /&gt;
 apt install usbutils network-manager sudo fdisk vim nano openssh-server iputils-ping wget curl iproute2 dialog locales kmod zip unzip u-boot-tools initramfs-tools&lt;br /&gt;
 # add user&lt;br /&gt;
 adduser radxa&lt;br /&gt;
 gpasswd -a radxa sudo&lt;br /&gt;
&lt;br /&gt;
2. Flash a debian11 arm64 image to a sd card or a emmc module &lt;br /&gt;
&lt;br /&gt;
3. Insert the SD card or emmc that has been burned into the image to the local computer and mount it &lt;br /&gt;
&lt;br /&gt;
 radxa@radxa:~$ sudo blkid /dev/sdb2&lt;br /&gt;
 /dev/sdb2: LABEL=&amp;quot;rootfs&amp;quot; UUID=&amp;quot;8bf96d05-7c97-42fc-863c-95e3e7603ef4&amp;quot; BLOCK_SIZE=&amp;quot;4096&amp;quot; TYPE=&amp;quot;ext4&amp;quot; PARTLABEL=&amp;quot;rootfs&amp;quot; PARTUUID=&amp;quot;474d4c1f-53da-447c-bab4-334abe0d5753&amp;quot;&lt;br /&gt;
 radxa@radxa:~$ sudo blkid /dev/sdb1&lt;br /&gt;
 /dev/sdb1: LABEL_FATBOOT=&amp;quot;config&amp;quot; LABEL=&amp;quot;config&amp;quot; UUID=&amp;quot;4AD5-9369&amp;quot; BLOCK_SIZE=&amp;quot;512&amp;quot; TYPE=&amp;quot;vfat&amp;quot; PARTLABEL=&amp;quot;config&amp;quot; PARTUUID=&amp;quot;8d24a074-ea49-4d24-a17c-82dd88776fa2&amp;quot;&lt;br /&gt;
 radxa@radxa:~$ lsblk&lt;br /&gt;
 ... ...&lt;br /&gt;
 sdb      8:16   1  29.3G  0 disk &lt;br /&gt;
 ├─sdb1   8:17   1    16M  0 part &lt;br /&gt;
 └─sdb2   8:18   1   5.1G  0 part&lt;br /&gt;
&lt;br /&gt;
  radxa@radxa:~$ sudo mount /dev/sdb2 /data2&lt;br /&gt;
  radxa@radxa:~$ cd /data2&lt;br /&gt;
&lt;br /&gt;
4. Go to the root file system, back up the boot directory, delete and replace the root file system, and restore the boot directory to the root file system &lt;br /&gt;
&lt;br /&gt;
 radxa@radxa:/data2$ sudo cp -r ./boot ~/&lt;br /&gt;
 radxa@radxa:/data2$ sudo rm -rf *&lt;br /&gt;
 radxa@radxa:/data2$ sudo cp -av /path/to/rootfs/* ./&lt;br /&gt;
 radxa@radxa:/data2$ sudo cp -av ~/boot/* ./boot/&lt;br /&gt;
&lt;br /&gt;
 radxa@radxa:/data2$ sudo cat ./etc/fstab&lt;br /&gt;
 # UNCONFIGURED FSTAB FOR BASE SYSTEM&lt;br /&gt;
&lt;br /&gt;
 //Replace the uuid in the preceding section&lt;br /&gt;
 radxa@radxa:/data2$ sudo cat ./etc/fstab&lt;br /&gt;
 # UNCONFIGURED FSTAB FOR BASE SYSTEM&lt;br /&gt;
 UUID=8bf96d05-7c97-42fc-863c-95e3e7603ef4       /       ext4    defaults        0       1&lt;br /&gt;
 UUID=4AD5-9369  /config vfat    defaults,x-systemd.automount    0       2&lt;br /&gt;
&lt;br /&gt;
5. Umount the sd card or the emmc, then boot up&lt;br /&gt;
&lt;br /&gt;
 radxa@radxa:/data2$ cd&lt;br /&gt;
 radxa@radxa:~$ sudo umount /data2 &lt;br /&gt;
&lt;br /&gt;
6.  After the system start, Check whether rootfs is armhf (32-bit)&lt;br /&gt;
&lt;br /&gt;
 radxa@rock-4c-plus:~$ sudo apt-get install file -y &lt;br /&gt;
 radxa@rock-4c-plus:~$ file /bin/ls&lt;br /&gt;
 /bin/ls: ELF 32-bit LSB pie executable, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-armhf.so.3, Buildd&lt;br /&gt;
 radxa@rock-4c-plus:~$ &lt;br /&gt;
&lt;br /&gt;
7. Check whether the tools are 32-bit. If not, uninstall the tool and reinstall it&lt;/div&gt;</summary>
		<author><name>Nascs</name></author>	</entry>

	</feed>