grub引导LinuxMint

注意事项:文件系统必须是FAT32

安装 sudo apt install gparted -y 分区管理软件

使用gparted分区和查看设备路径

bash 复制代码
sudo apt-get install grub-efi-amd64
#/dev/sdd1 是需要制作分区引导的设备路径
sudo mount /dev/sdd1 /mnt/123
#bios
sudo grub-install --target=i386-pc \
--boot-directory=/mnt/123/boot --recheck /dev/sdd
#efi
sudo grub-install --target=x86_64-efi \
--efi-directory=/mnt/123 --boot-directory=/mnt/123/boot \
--removable --recheck

boot/grub 路径创建 grub.cfg 文件内容如下

bash 复制代码
set timeout=2
set default=0
set is_preload=false
set fallback=1
set color_normal=white/black
set color_highlight=black/light-gray
export color_normal color_highlight;
#----------------------
#加载文件系统支持
insmod part_gpt
insmod part_msdos
insmod fat
insmod ntfs
insmod ext2
insmod exfat
insmod btrfs
insmod gfxterm
insmod png
insmod all_video
insmod iso9660
insmod udf
#------------------------
#设置显示模式
insmod font
if loadfont ${prefix}/Fonts/unicode.pf2; then
	set gfxmode=auto
	export gfxmode
	insmod efi_gop
	insmod efi_uga
	insmod all_video
	insmod video_bochs
	insmod video_cirrus
	insmod font
	insmod gfxterm
	insmod gfxmenu
	insmod gettext
	insmod jpeg
	insmod png
	if terminal_output gfxterm; then
		
		set locale_dir=/boot/grub/Locale/
		set lang=zh_CN
		export lang
	fi
fi
#------------------------
#设置背景图片 boot/gurb/image
terminal_output  gfxterm
background_image $prefix/image/TETER.png
#------------------------
#启动镜像
menuentry "Mint 21.2 镜像系统" --class gnu-linux --class gnu --class os {
  echo ""
  echo "正在启动 Mint 21.2 镜像系统......"
  set isofile=/pe/LinuxMint21.2/VM17-Mint-21.3-DOCKER-SMB.iso
  search --file --no-floppy --set=root $isofile
  loopback loop $isofile
  linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=$isofile
  locales=zh_CN.UTF-8
  initrd (loop)/casper/initrd.lz
}
相关推荐
1nullptr2 分钟前
UNIX程序设计基本概念和术语
linux
网硕互联的小客服11 分钟前
未来趋势:AI与量子计算对服务器安全的影响
运维·服务器·网络·网络安全·量子计算
黑客老李18 分钟前
EDUSRC:智慧校园通用漏洞挖掘(涉校园解决方案商)
服务器·前端·网络·安全·web安全
宇钶宇夕19 分钟前
STEP 7 MicroWIN SMART V2.2 的详细安装步骤及注意事项
运维·服务器·程序人生·自动化
是阿建吖!26 分钟前
【Linux | 网络】网络基础
linux·网络
mmoyula26 分钟前
【RK3568 驱动开发:实现一个最基础的网络设备】
android·linux·驱动开发
阿杆1 小时前
😡同事查日志太慢,我现场教他一套 grep 组合拳!
linux·后端
墨小傲1 小时前
基于Linux下的vscode c/c++开发环境搭建详细教程
linux·c语言·vscode
cui_win1 小时前
【网络】Linux 内核优化实战 - net.ipv4.tcp_timestamps
linux·网络·tcp/ip
czhc11400756631 小时前
Linux 77 FTP
linux·运维·服务器