制作ubuntu文件系统


制作ubuntu文件系统:

https://community.nxp.com/docs/DOC-330147

ubuntu16.04
Installing with debootstrap:

$ mkdir ubuntu_rootfs
$ target=ubuntu_rootfs  
$ distro=xenial  
$ sudo debootstrap --arch=armhf --foreign --include=ubuntu-keyring,apt-transport-https,ca-certificates,openssl $distro "$target" http://ports.ubuntu.com  
$ sudo cp /usr/bin/qemu-arm-static $target/usr/bin  
$ sudo cp /etc/resolv.conf $target/etc 

$ sudo chroot $target
# distro=xenial  
# export LC_ALL=C LANGUAGE=C LANG=C  
# /debootstrap/debootstrap --second-stage  
# nano /etc/apt/sources.list  
deb http://ports.ubuntu.com/ubuntu-ports/ xenial main restricted universe multiverse  
deb http://ports.ubuntu.com/ubuntu-ports/ xenial-updates main restricted universe multiverse  
deb http://ports.ubuntu.com/ubuntu-ports/ xenial-security main restricted universe multiverse

# apt-get update  
# apt -y -f install  
# apt-get upgrade  
# apt-get install nano 

# //解决只读文件系统问题
# nano /etc/fstab
# stock fstab - you probably want to override this with a machine specific one

/dev/root            /                    auto       defaults              1  1
proc                 /proc                proc       defaults              0  0
devpts               /dev/pts             devpts     mode=0620,gid=5       0  0
tmpfs                /run                 tmpfs      mode=0755,nodev,nosuid,strictatime 0  0
tmpfs                /var/volatile        tmpfs      defaults              0  0

# uncomment this if your device has a SD/MMC/Transflash slot
#/dev/mmcblk0p1       /media/card          auto       defaults,sync,noauto  0  0

# passwd root
# exit  
$ sudo rm $target/etc/resolv.conf  
$ sudo rm $target/usr/bin/qemu-arm-static  

文章作者: shell
版权声明: 本博客所有文章除特別声明外,均采用 CC BY 4.0 许可协议。转载请注明来源 shell !
评论
  目录