一、下载openEuler镜像:
https://mirrors.huaweicloud.com/openeuler/openEuler-20.03-LTS/ISO/x86_64/
二、使用上一章节做的启动盘启动,进入TinyCore系统:
(1)将U盘的剩余区域分区,格式化成ext3(我的是sda是U盘,自己根据自己的实际情况调整):
fdisk -l
fdisk /dev/sda
依次使用下面的命令:p,n(p,2,起始扇区,+4G),w
mkfs.ext3 -L "IMG_SET" /dev/sda2
(2)挂载上面的分区,和存放iso的ntfs分区,然后将iso镜像拷贝到ext3分区
mkdir -p /mnt/sda2
mount /dev/sda2 /mnt/sda2
mkdir -p /mnt/ntfs01
mount -t ntfs /dev/nvme0n1p5 /mnt/ntfs01
mkdir -p /mnt/sda2/img_set
cp /mnt/ntfs01/Downloads/openEuler*-dvd.iso /mnt/sda2/img_set/
三、编写grub.cfg配置文件:
set gfxpayload=keep
insmod gzio
insmod part_gpt
insmod ext2
search --no-floppy --set=root -l 'BOOT_DISK'
menuentry "Tinycore ISO --TC" {
set isofile="/img_set/TinyCorePure64-current.iso"
loopback loop $isofile
linux (loop)/boot/vmlinuz64 loglevel=3 cde vga=791 video=vesafb:ywrap,mtrr:3 linux repo=hd:LABEL=BOOT_DISK:/
initrd (loop)/boot/corepure64.gz
}
menuentry "Tinycore ISO --TCW" {
set isofile="/img_set/TinyCorePure64-current.iso"
loopback loop $isofile
linux (loop)/boot/vmlinuz64 loglevel=3 cde waitusb=10 vga=791 video=vesafb:ywrap,mtrr:3 linux repo=hd:LABEL=BOOT_DISK:/
initrd (loop)/boot/corepure64.gz
}
menuentry 'Install openEuler 20.03 LTS' --class fedora --class gnu-linux --class gnu --class os {
insmod ntfs
insmod linux
search --no-floppy --set=root -l 'IMG_SET'
insmod loopback
insmod iso9660
loopback loop /img_set/openEuler-20.03-LTS-x86_64-dvd.iso
set root=(loop)
linux /isolinux/vmlinuz repo=hd:LABEL=IMG_SET:/img_set quiet
initrd /isolinux/initrd.img
}
menuentry "Reboot" {
reboot
}
制作openEuler启动U盘完成
来源:oschina
链接:https://my.oschina.net/u/2300943/blog/4700274