2021年02月17日
LiveCDCustomization Linux Xfce マジこの手順で自分専用のライブCDつくれます。
# first Get Fedora-Xfce-Live-x86_64-32-1.6.iso
wget https://dl.fedoraproject.org/pub/fedora/linux/releases/32/Spins/x86_64/iso/Fedora-Xfce-Live-x86_64-32-1.6.iso
mkdir tmp3 tmp2 tmp1
mount Fedora-Xfce-Live-x86_64-32-1.6.iso tmp3
mount tmp3/LiveOS/squashfs.img tmp2
tmp2/LiveOS/rootfs.img tmp1
cp -a tmp3 LIVECDIMG
mkdir -p squashfs/LiveOS
truncate -s $((2**33)) squashfs/LiveOS/rootfs.img
mkfs.ext4 -L Fedoralivecd squashfs/LiveOS/rootfs.img
mkdir -p rootfs
mount squashfs/LiveOS/rootfs.img rootfs
cp -a tmp1/* rootfs/
echo hostonly="no" > zzrootfs/etc/dracut.conf.d/01-liveos.conf
echo add_dracutmodules+="dmsquash-live" >> zzrootfs/etc/dracut.conf.d/01-liveos.conf
echo compress="xz" >> zzrootfs/etc/dracut.conf.d/01-liveos.conf
ln -s rootfs zzrootfs
#----------------preparation
mount -o bind /dev/ zzrootfs/dev/
mount -o bind /proc/ zzrootfs/proc/
mount -o bind /tmp/ zzrootfs/tmp/
mount -o bind /run/ zzrootfs/run/
cp /etc/resolv.conf zzrootfs/etc
#------- your -LiveCDCustomization start
chroot zzrootfs
#^^^^^^^^^^^^^^^^^^^ Customaizton braburabura some work
# for rexample
dnf update -y #brabrabra do something
#-------- your -LiveCDCustomization END
#--- Customaizton closing
exit
umount zzrootfs/dev/
umount zzrootfs/proc/
umount zzrootfs/tmp/
umount zzrootfs/run/
umount rootfs
rm -rf squashfs.img.new
mksquashfs squashfs squashfs.img.new -comp gzip
\cp -f squashfs.img.new LIVECDIMG/LiveOS/squashfs.img
###### check the Label Name
cat LIVECDIMG/isolinux/isolinux.cfg |grep CDLABEL
# you will see
#append initrd=initrd.img root=live:CDLABEL=Fedora-Xfce-Live-32-1-6 rd.live.image quiet
# append initrd=initrd.img root=live:CDLABEL=Fedora-Xfce-Live-32-1-6 rd.live.image rd.live.check quiet
# append initrd=initrd.img root=live:CDLABEL=Fedora-Xfce-Live-32-1-6 rd.live.image nomodeset quiet
# or something your CDLABEL is Fedora-Xfce-Live-32-1-6
LANG=C
mkisofs -v -r -J -l -input-charset utf-8 \
-V 'Fedora-Xfce-Live-32-1-6' \
-cache-inodes \
-b isolinux/isolinux.bin \
-c isolinux/boot.cat \
-no-emul-boot \
-boot-load-size 4 \
-boot-info-table \
-o Fedora-Xfce-Live.iso \
./LIVECDIMG
##### you will see Fedora-Xfce-Live.iso file by "ls" command
## check it using "oracle VM VirtualBox"
That is ALL ???????
This time you can Not log in by SeLinux (preventing your log in)
SELINUXが オートログインをブロックしています。
とりあえずっとっとっと
provisionaly using enforcing=0 kernel option
so so
LIVECDIMG/isolinux/isolinux.cfg
ちなみに この アップデートやってますが カーネルが入れ替わったことになっています
しかし 本当のカーネルは vmlinuz ですので カーネル固定です。
l
wget https://dl.fedoraproject.org/pub/fedora/linux/releases/32/Spins/x86_64/iso/Fedora-Xfce-Live-x86_64-32-1.6.iso
mkdir tmp3 tmp2 tmp1
mount Fedora-Xfce-Live-x86_64-32-1.6.iso tmp3
mount tmp3/LiveOS/squashfs.img tmp2
tmp2/LiveOS/rootfs.img tmp1
cp -a tmp3 LIVECDIMG
mkdir -p squashfs/LiveOS
truncate -s $((2**33)) squashfs/LiveOS/rootfs.img
mkfs.ext4 -L Fedoralivecd squashfs/LiveOS/rootfs.img
mkdir -p rootfs
mount squashfs/LiveOS/rootfs.img rootfs
cp -a tmp1/* rootfs/
echo hostonly="no" > zzrootfs/etc/dracut.conf.d/01-liveos.conf
echo add_dracutmodules+="dmsquash-live" >> zzrootfs/etc/dracut.conf.d/01-liveos.conf
echo compress="xz" >> zzrootfs/etc/dracut.conf.d/01-liveos.conf
ln -s rootfs zzrootfs
#----------------preparation
mount -o bind /dev/ zzrootfs/dev/
mount -o bind /proc/ zzrootfs/proc/
mount -o bind /tmp/ zzrootfs/tmp/
mount -o bind /run/ zzrootfs/run/
cp /etc/resolv.conf zzrootfs/etc
#------- your -LiveCDCustomization start
chroot zzrootfs
#^^^^^^^^^^^^^^^^^^^ Customaizton braburabura some work
# for rexample
dnf update -y #brabrabra do something
#-------- your -LiveCDCustomization END
#--- Customaizton closing
exit
umount zzrootfs/dev/
umount zzrootfs/proc/
umount zzrootfs/tmp/
umount zzrootfs/run/
umount rootfs
rm -rf squashfs.img.new
mksquashfs squashfs squashfs.img.new -comp gzip
\cp -f squashfs.img.new LIVECDIMG/LiveOS/squashfs.img
###### check the Label Name
cat LIVECDIMG/isolinux/isolinux.cfg |grep CDLABEL
# you will see
#append initrd=initrd.img root=live:CDLABEL=Fedora-Xfce-Live-32-1-6 rd.live.image quiet
# append initrd=initrd.img root=live:CDLABEL=Fedora-Xfce-Live-32-1-6 rd.live.image rd.live.check quiet
# append initrd=initrd.img root=live:CDLABEL=Fedora-Xfce-Live-32-1-6 rd.live.image nomodeset quiet
# or something your CDLABEL is Fedora-Xfce-Live-32-1-6
LANG=C
mkisofs -v -r -J -l -input-charset utf-8 \
-V 'Fedora-Xfce-Live-32-1-6' \
-cache-inodes \
-b isolinux/isolinux.bin \
-c isolinux/boot.cat \
-no-emul-boot \
-boot-load-size 4 \
-boot-info-table \
-o Fedora-Xfce-Live.iso \
./LIVECDIMG
##### you will see Fedora-Xfce-Live.iso file by "ls" command
## check it using "oracle VM VirtualBox"
That is ALL ???????
This time you can Not log in by SeLinux (preventing your log in)
SELINUXが オートログインをブロックしています。
とりあえずっとっとっと
provisionaly using enforcing=0 kernel option
so so
LIVECDIMG/isolinux/isolinux.cfg
default vesamenu.c32
timeout 25
display boot.msg
# Clear the screen when exiting the menu, instead of leaving the menu displayed.
# For vesamenu, this means the graphical background is still displayed without
# the menu itself for as long as the screen remains in graphics mode.
menu clear
menu background splash.png
menu title Fedora-Xfce-Live 32
menu vshift 8
menu rows 18
menu margin 8
#menu hidden
menu helpmsgrow 15
menu tabmsgrow 13
# Border Area
menu color border * #00000000 #00000000 none
# Selected item
menu color sel 0 #ffffffff #00000000 none
# Title bar
menu color title 0 #ff7ba3d0 #00000000 none
# Press [Tab] message
menu color tabmsg 0 #ff3a6496 #00000000 none
# Unselected menu item
menu color unsel 0 #84b8ffff #00000000 none
# Selected hotkey
menu color hotsel 0 #84b8ffff #00000000 none
# Unselected hotkey
menu color hotkey 0 #ffffffff #00000000 none
# Help text
menu color help 0 #ffffffff #00000000 none
# A scrollbar of some type? Not sure.
menu color scrollbar 0 #ffffffff #ff355594 none
# Timeout msg
menu color timeout 0 #ffffffff #00000000 none
menu color timeout_msg 0 #ffffffff #00000000 none
# Command prompt text
menu color cmdmark 0 #84b8ffff #00000000 none
menu color cmdline 0 #ffffffff #00000000 none
# Do not display the actual menu unless the user presses a key. All that is displayed is a timeout message.
menu tabmsg Press Tab for full configuration options on menu items.
menu separator # insert an empty line
menu separator # insert an empty line
label linux
menu label ^Start Fedora-Xfce-Live 32
menu default
kernel vmlinuz
append initrd=initrd.img root=live:CDLABEL=Fedora-Xfce-Live-32-1-6 rd.live.image enforcing=0
label check
menu label Test this ^media & start Fedora-Xfce-Live 32
kernel vmlinuz
append initrd=initrd.img root=live:CDLABEL=Fedora-Xfce-Live-32-1-6 rd.live.image rd.live.check enforcing=0
menu separator # insert an empty line
# utilities submenu
menu begin ^Troubleshooting
menu title Troubleshooting
label vesa
menu indent count 5
menu label Start Fedora-Xfce-Live 32 in ^basic graphics mode
text help
Try this option out if you're having trouble starting
Fedora-Xfce-Live 32.
endtext
kernel vmlinuz
append initrd=initrd.img root=live:CDLABEL=Fedora-Xfce-Live-32-1-6 rd.live.image nomodeset quiet
label memtest
menu label Run a ^memory test
text help
If your system is having issues, a problem with your
system's memory may be the cause. Use this utility to
see if the memory is working correctly.
endtext
kernel memtest
menu separator # insert an empty line
label local
menu label Boot from ^local drive
localboot 0xffff
menu separator # insert an empty line
menu separator # insert an empty line
label returntomain
menu label Return to ^main menu
menu exit
menu end
ちなみに この アップデートやってますが カーネルが入れ替わったことになっています
しかし 本当のカーネルは vmlinuz ですので カーネル固定です。
l
【このカテゴリーの最新記事】
-
no image
-
no image
この記事へのコメント
コメントを書く
この記事へのトラックバックURL
https://fanblogs.jp/tb/10544821
※ブログオーナーが承認したトラックバックのみ表示されます。
この記事へのトラックバック