It's a lightweight Linux that lets busybox do anything. Due to its light weight, it is often used as a component of Docker. GUI? I don't know.
The image of Alpine Linux is below.
https://www.alpinelinux.org/downloads/
Normally, a Standard ISO image is used. For offline installations, Extend is a good choice. Use Virtual ISO for the virtual OS. The Virtual image is extraordinarily small at 40MB.
busybox is a command for embedding, and the file size is reduced by making ls and cp symbolic of busybox. Actually this has a trap (behavior is slightly different)
By the way, if you look under/bin of initramfs, there are only sh and busybox.
Alpine Linux uses a shell called ash. Compatible with sh, but not compatible with bash. If you want to run bash-dependent scripts, you need to install bash separately.
--For Windows, write in ISO mode with rafus. --Linux is the official reference
I tried inserting the 1GB USB I picked up, but it works well.
Alpine Linux does not autostart the installer. When you start it, the login screen just starts. Log in as root and then from the command line
setup-alpine
You can install it by typing ――, but this time it will not be done.
From here is the production.
Alpine Linux has a system called Alpine local backup. You can do something similar to Ubuntu's live usb perticient (casper-rw), but
lbu commit
If you do not type, the update will not be reflected. It seems that the range to be updated is only some other parts such as/etc, and/root and/bin etc. are not reflected (There are ways to change the settings under/etc/lbu or use lbu include). When running lbu, you need to rewrite /etc/lbu/lbu.conf first.
This update file will be spit out to the root with a name like localhost.apkov.tar.gz, so you can fix it by hand. Use this for customization. Unlike casper-rw, it does not require a mount and is tar.gz, so it can be easily rewritten. It's also lightweight because it doesn't sync.
First, in order to execute in the Japanese environment, execute the following.
##Change keymap
# setup-keymap
##Change time zone
# setup-timezone
##Save changes
# lbu commit
Japanese? Unfamiliar child
Insert the apk file into the free media. USB is mounted on/media/usb,
So rewrite/etc/inittab.
Change before
tty1::respawn:/sbin/getty 38400 tty1
After change
tty1::respawn:/bin/sh /media/usb/init.sh 38400 tty1
As I wrote earlier, the update will not be reflected unless you execute lbu commit.
Then write a script to run init.sh (/ media/usb is in read only mode so it can't be rewritten directly). Here,/media/usb is called, but if it is under/etc, it will work even if the USB memory is removed after startup.
However, note that once the memory is removed, the area under/media/usb will be empty.
--If the behavior is strange after startup, switch terminals with CTRL + ALT + F2 and process
With this, you can easily make HDD cleaners without troublesome customization.
For example, shred is used to make a disc shredder imitation, but Alpine Linux shred is a busybox symbolic link. Busybox shred can only erase files and has different options. So you need to install GNU coreutils separately.
The package manager for Alpine Linux is apk, and add is used when installing.
apk add coreutils
――If so, you will be able to use GNU shred, which is not busybox.
Alpine Linux is lightweight, so it seems that there are cases where the library is insufficient when trying to run the utility.
However, those apks should be installed at startup. For small binaries, the installation time is within the margin of error (you can also change the settings under/etc/lbu)
Create an extra folder on the USB and throw in the apk to install.
apk add --no-network --allow-untrusted --force-non-repository /media/usb/extra/*.apk
In this way, I forcibly install it from init.sh (I have no choice but to make one without a package), so I can easily make LiveUSB because I do not customize it.
I feel that using the lbu package is the correct way to do it ...
Recommended Posts