In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)05/31 Report--
This article introduces the relevant knowledge of "how to use the Ubuntu DIY operating system". Many people will encounter such a dilemma in the operation of actual cases, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!
Export WORK=~/diy_ubuntu
Mkdir-p $WORK
Then we hang the CD image file to / mntsudo mount-t iso9660-o loop dapper-live-i386.iso / mnt cd $WORK
Ubuntu DIY copy files CD-ROM files
Mkdir Ubuntu-livecd
Cp-a / mnt/. Ubuntu-livecd
Chmod-RUBUBW ubuntu-livecd
Sudo umount / mnt
Since the CD contains a lot of free software under windows, let's delete unnecessary files. Of course you can keep it. Rm-rf $WORK/ubuntu-livecd/programs
Hang up the compressed files on the CD so that you can see a complete linux operating system directory in the $WORK/old directory later. Mkdir $WORK/old
Sudo mount-t squashfs-o loop,ro $WORK/ubuntu-livecd/casper/filesystem.squashfs $WORK/old
We set up a 2GB-sized file system, then format the file as a device file, and the system gives a warning, ignore it, and choose yes.
Sudo dd if=/dev/zero of=$WORK/ubuntu-fs.ext2 bs=1M count=2147
Sudo mke2fs $WORK/ubuntu-fs.ext2
Then we hang up the empty file system.
Mkdir $WORK/new
Sudo mount-o loop $WORK/ubuntu-fs.ext2 $WORK/new
Copy files from the linux Ubuntu DIY operating system. Since the linux we got in advance is compressed, we decompressed it. Sudo cp-a $WORK/old/. $WORK/new
Of course, $WORK/old is of no use now. Scrap it sudo umount $WORK/old
Let's first get into the Ubuntu DIY operating system we just got.
Sudo cp / etc/resolv.conf $WORK/new/etc/
Sudo mount-t proc-o bind / proc $WORK/new/proc
Sudo chroot $WORK/new / bin/bash
Now you are in the system, shouting linux for human beings, refining ubuntu, and doing whatever you want.
# vi / etc/apt/sources.list # choose the source that suits you
# apt-get update
# apt-get dist-upgrade
# apt-get install the software you want to install
# apt-get clean
More configuration of Ubuntu DIY
* leave your operating system
# exit
Sudo umount $WORK/new/proc
Sudo rm $WORK/new/etc/resolv.conf
Now you're back to your original state.
Reorganize the manifest.
Sudo chroot $WORK/new dpkg-query-W-- showformat='$ {Package} ${Version}\ n'> $WORK/ubuntu-livecd/casper/filesystem.manifest
Then do a "disk cleanup".
Sudo dd if=/dev/zero of=$WORK/new/dummyfile
Sudo rm $WORK/new/dummyfile
Ubuntu DIY recompression system
Sudo rm $WORK/ubuntu-livecd/casper/filesystem.squashfs
Cd $WORK/new
Sudo mksquashfs. $WORK/ubuntu-livecd/casper/filesystem.squashfs
All your changes have been saved. Now get rid of $WORK/new.
Cd $WORK
Sudo umount $WORK/new
Recalculate the md5 of the file
Cd $WORK/ubuntu-livecd
Sudo find. -type f-print0 | xargs-0 md5sum | sudo tee md5sum.txt
Ubuntu DIY set up a CD mirror, the command is very long, put up with it.
Cd $WORK
Sudo mkisofs-o ubuntu-new.iso-b isolinux/isolinux.bin-c isolinux/boot.cat-no-emul-boot-boot-load-size 4-boot-info-table-r-V "My Cool Ubuntu Live CD"-cache-inodes-J-l ubuntu-livecd
Then you can burn the CD with iso.
This is the end of the content of "how to use the Ubuntu DIY operating system". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.