❯ lscpu | grep "MHz" CPU MHz: 3400.159 CPU max MHz: 3800.0000 CPU min MHz: 800.0000 ❯ cat /proc/cpuinfo | grep "cpu MHz" cpu MHz : 3399.938 cpu MHz : 3471.310 cpu MHz : 3446.992 cpu MHz : 3497.726 cpu MHz : 3445.833 cpu MHz : 3496.419 cpu MHz : 3448.879 cpu MHz : 943.164
cs@debian:~$ sudo update-grub Generating grub configuration file ... Found background image: /usr/share/images/desktop-base/desktop-grub.png Found linux image: /boot/vmlinuz-5.10.0-21-amd64 Found initrd image: /boot/initrd.img-5.10.0-21-amd64 Warning: os-prober will be executed to detect other bootable partitions. Its output will be used to detect bootable binaries on them and create new boot entries. Found Windows Boot Manager on /dev/sda2@/EFI/Microsoft/Boot/bootmgfw.efi Adding boot menu entry for UEFI Firmware Settings ... done
#用户目录配置信息文件 /home/cs$ tar cvpzf cs.tar.gz --exclude=.cache --exclude=cs.tar.gz ./.*
/media/cs/xx/cs$ tar xvpfz cs.tar.gz -C ./
tar -cvpzf ./var.tar.gz --exclude=/var/tmp --exclude=/var/log /var tar xvpfz var.tar.gz -C /media/cs/xx/var --strip-components 1
tar -cvpzf ./usr.tar.gz /usr tar xvpfz usr.tar.gz -C /media/cs/xx/usr --strip-components 1
tar -cvpzf ./etc.tar.gz --exclude=/etc/fstab /etc tar xvpfz etc.tar.gz -C /media/cs/xx/etc --strip-components 1
–exclude 权限问题无法或无需备份的进行过滤文件目录
提前备份新旧系统的2个文件
/etc/fstab(fstab 盘符uuid不一样)
/boot/grub/grub.cfg (grub.cfg 盘符uuid不一样)
登陆新系统验证
grub
win
win os u盘修复win引导在esp盘
linux
无法进入grub
linux u盘 引导修复 ,主要是挂载目录到shell环境
grub>
在救援模式下只有很少的命令可以用:set , ls , insmod , root , prefix
ls 查看设备
set 查看环境变量,这里可以查看启动路径和分区。
root 指定用于启动系统的分区,在救援模式下设置grub启动分区
prefix 设定grub启动路径
insmod 加载模块normal
1 2 3 4 5 6 7
grub rescue>set root=(hd0,gpt4)
grub rescue>set prefix=(hd0,gpt4)/boot/grub
grub rescue>insmod normal #启动normal启动
grub rescue>normal #之后你就会看到熟悉的启动菜单栏了
出现选择界面,进入系统
1 2 3 4 5 6 7 8 9 10 11 12
❯ update-grub Generating grub configuration file ... Found theme: /usr/share/grub/themes/breeze/theme.txt Found background image: /usr/share/images/desktop-base/desktop-grub.png Found linux image: /boot/vmlinuz-6.1.0-0.deb11.6-amd64 Found initrd image: /boot/initrd.img-6.1.0-0.deb11.6-amd64 Warning: os-prober will be executed to detect other bootable partitions. Its output will be used to detect bootable binaries on them and create new boot entries. Found Windows Boot Manager on /dev/nvme0n1p6@/EFI/Microsoft/Boot/bootmgfw.efi Adding boot menu entry for UEFI Firmware Settings ... done
# <file system> <mount point> <type> <options> <dump> <pass> # / was on /dev/nvme0n1p1 during installation UUID=8aef5178-364f-47de-9016-3b3bb254aadd / ext4 errors=remount-ro 0 1 # /boot/efi was on /dev/nvme0n1p6 during installation UUID=E509-52C5 /boot/efi vfat umask=0077 0 1 # /home was on /dev/nvme0n1p3 during installation UUID=8c8a753d-b3f4-45ee-b2a8-629c13f4c18e /home ext4 defaults 0 2 # /opt was on /dev/nvme0n1p4 during installation UUID=a40908d9-e0e9-4d17-8aad-d7e1a1f90730 /opt ext4 defaults 0 2 # /usr was on /dev/nvme0n1p2 during installation UUID=ff3aedfa-1448-4161-95fb-3b43fddf4506 /usr ext4 defaults 0 2 # swap was on /dev/nvme0n1p5 during installation UUID=bb259291-c221-4e34-b422-663e0bea289e none swap sw 0 0 # /data was on /dev/sdb3 during installation
old
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
# <file system> <mount point> <type> <options> <dump> <pass> # / was on /dev/sda7 during installation UUID=f26d54f8-1746-47a9-8805-3d339062ab3a / ext4 errors=remount-ro 0 1 # /boot/efi was on /dev/sda2 during installation UUID=FF6E-1E1A /boot/efi vfat umask=0077 0 1 # /home was on /dev/sda6 during installation UUID=abca56cf-7ab5-4c4a-a5ab-f4b2ebdc0c82 /home ext4 defaults 0 2 # /opt was on /dev/sda4 during installation UUID=5f92ed02-f45d-49e5-b245-09f7447eac24 /opt ext4 defaults 0 2 # /usr was on /dev/sda5 during installation UUID=5cb263cd-27a3-4ab2-9090-7417f4c80536 /usr ext4 defaults 0 2 # swap was on /dev/sda3 during installation UUID=fe04554c-3dae-42e5-9fd5-5ddda44d2f1c none swap sw 0 0 # /data was on /dev/sdb3 during installation UUID=b519f517-5f11-4108-8601-e456e3da4fd1 /home/cs/data xfs defaults 0 2
This is the initramfs configuration where mdadm.conf is copied and some magic happens to start the array. Did you create a md raid array or use btrfs array options? If you used mdadm then mdadm --detail --scan >> /etc/mdadm/mdadm.conf will add the array configuration and update-initramfs -u -k all will create a new initramfs image. The resume entry is in /etc/initramfs-tools/conf.d/resume if you want to change that (i had to change it to ‘none’ for encrypted swap).