Tôi hiện đang chạy Ubuntu 21.10 và Windows 10. Tôi luôn thiết lập grub của mình theo cách tôi muốn bằng công cụ tùy chỉnh grub. Trong số các thay đổi khác (tất cả đều hoạt động), tôi đã thiết lập nó để nó khởi động từ phân vùng được khởi động lần cuối. Cài đặt này hoạt động vào ngày 20.04, nhưng hiện tại thì không. Thay vào đó, nó luôn cố gắng khởi động vào Windows.
CHỈNH SỬA: Đây là nội dung của/etc/default/grub:
# Nếu bạn thay đổi tệp này, hãy chạy 'update-grub' sau đó để cập nhật
# /boot/grub/grub.cfg.
# Để biết tài liệu đầy đủ về các tùy chọn trong tệp này, hãy xem:
# info -f grub -n 'Cấu hình đơn giản'
GRUB_DEFAULT=đã lưu
GRUB_TIMEOUT_STYLE="ẩn"
GRUB_TIMEOUT="10"
GRUB_DISTRIBUTOR="`lsb_release -i -s 2> /dev/null || echo Debian`"
GRUB_CMDLINE_LINUX_DEFAULT="sơ yếu lý lịch giật gân yên tĩnh=UUID=920a469a-eee8-4841-b43a-e96694ac485b"
GRUB_CMDLINE_LINUX=""
# Bỏ ghi chú để kích hoạt lọc BadRAM, sửa đổi cho phù hợp với nhu cầu của bạn
# Điều này hoạt động với Linux (không cần bản vá) và với bất kỳ hạt nhân nào có được
# thông tin bản đồ bộ nhớ từ GRUB (GNU Mach, kernel của FreeBSD ...)
#GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef"
# Bỏ ghi chú để tắt thiết bị đầu cuối đồ họa (chỉ dành cho grub-pc)
#GRUB_TERMINAL="bảng điều khiển"
# Độ phân giải được sử dụng trên thiết bị đầu cuối đồ họa
# lưu ý rằng bạn chỉ có thể sử dụng các chế độ mà card đồ họa của bạn hỗ trợ qua VBE
# bạn có thể nhìn thấy chúng trong GRUB thực bằng lệnh `vbeinfo'
#GRUB_GFXMODE="640x480"
# Bỏ ghi chú nếu bạn không muốn GRUB chuyển tham số "root=UUID=xxx" cho Linux
#GRUB_DISABLE_LINUX_UUID="true"
# Bỏ ghi chú để vô hiệu hóa việc tạo các mục menu của chế độ khôi phục
#GRUB_DISABLE_RECOVERY="true"
# Bỏ ghi chú để nhận tiếng bíp khi bắt đầu grub
#GRUB_INIT_TUNE="480 440 1"
GRUB_SAVEDEFAULT=true
CHỈNH SỬA 2: Đây là nội dung của tệp trong /etc/default/grub.d: init-select.cfg
# Khắc phục lỗi trong gói init-select lỗi thời đã bị hỏng
# grub-mkconfig khi init-select đã bị xóa nhưng không bị xóa. tập tin này làm
# nothing và sẽ bị xóa trong bản phát hành sau.
#
# Nhìn thấy:
# https://bugs.debian.org/858528
# https://bugs.debian.org/863801
CHỈNH SỬA 3: Đây là nội dung của /etc/grub.d:
./44_memtest86+
./.script_sources.txt
./43_linux_xen
./41_linux_proxy
./45_os-prober
./47_custom_proxy
./00_header
./46_uefi-chương trình cơ sở
./10_linux_proxy
./thùng rác
./bin/grubcfg_proxy
./proxifiedScripts
./proxifiedScripts/custom
./proxifiedScripts/linux
./42_linux_zfs
./README
./05_debian_theme
./40_custom_proxy
./48_custom
./sao lưu
./backup/default_grub
./backup/boot_grub
./backup/boot_grub/unicode.pf2
./backup/boot_grub/grubenv
./backup/boot_grub/grub.cfg
./backup/boot_grub/gfxblacklist.txt
./backup/boot_grub/x86_64-efi
./backup/boot_grub/x86_64-efi/newc.mod
./backup/boot_grub/x86_64-efi/part_sun.mod
./backup/boot_grub/x86_64-efi/mul_test.mod
./backup/boot_grub/x86_64-efi/boot.mod
./backup/boot_grub/x86_64-efi/linux.mod
./backup/boot_grub/x86_64-efi/usb_keyboard.mod
./backup/boot_grub/x86_64-efi/scsi.mod
./backup/boot_grub/x86_64-efi/search_fs_file.mod
./backup/boot_grub/x86_64-efi/pbkdf2.mod
./backup/boot_grub/x86_64-efi/div.mod
./backup/boot_grub/x86_64-efi/video.lst
./backup/boot_grub/x86_64-efi/part_acorn.mod
./backup/boot_grub/x86_64-efi/nilfs2.mod
./backup/boot_grub/x86_64-efi/usbtest.mod
./backup/boot_grub/x86_64-efi/f2fs.mod
./backup/boot_grub/x86_64-efi/pbkdf2_test.mod
./backup/boot_grub/x86_64-efi/blocklist.mod
./backup/boot_grub/x86_64-efi/datetime.mod
./backup/boot_grub/x86_64-efi/shift_test.mod
./backup/boot_grub/x86_64-efi/mmap.mod
./backup/boot_grub/x86_64-efi/chain.mod
./backup/boot_grub/x86_64-efi/core.efi
./backup/boot_grub/x86_64-efi/macho.mod
./backup/boot_grub/x86_64-efi/cbmemc.mod
./backup/boot_grub/x86_64-efi/ext2.mod
./backup/boot_grub/x86_64-efi/xnu_uuid.mod
./backup/boot_grub/x86_64-efi/part_gpt.mod
./backup/boot_grub/x86_64-efi/morse.mod
./backup/boot_grub/x86_64-efi/fat.mod
./backup/boot_grub/x86_64-efi/dm_nv.mod
./backup/boot_grub/x86_64-efi/minix_be.mod
./backup/boot_grub/x86_64-efi/part_amiga.mod
./backup/boot_grub/x86_64-efi/setpci.mod
./backup/boot_grub/x86_64-efi/datehook.mod
./backup/boot_grub/x86_64-efi/ehci.mod
./backup/boot_grub/x86_64-efi/part_plan.mod
./backup/boot_grub/x86_64-efi/part_apple.mod
./backup/boot_grub/x86_64-efi/ahci.mod
./backup/boot_grub/x86_64-efi/bsd.mod
./backup/boot_grub/x86_64-efi/cmp.mod
./backup/boot_grub/x86_64-efi/cpio.mod
./backup/boot_grub/x86_64-efi/luks.mod
./backup/boot_grub/x86_64-efi/video_cirrus.mod
./backup/boot_grub/x86_64-efi/reboot.mod
./backup/boot_grub/x86_64-efi/smbios.mod
./backup/boot_grub/x86_64-efi/ls.mod
./backup/boot_grub/x86_64-efi/random.mod
./backup/boot_grub/x86_64-efi/hexdump.mod
./backup/boot_grub/x86_64-efi/video_colors.mod
./backup/boot_grub/x86_64-efi/keylayouts.mod
./backup/boot_grub/x86_64-efi/bufio.mod
./backup/boot_grub/x86_64-efi/nativedisk.mod
./backup/boot_grub/x86_64-efi/usbserial_usbdebug.mod
./backup/boot_grub/x86_64-efi/modinfo.sh
./backup/boot_grub/x86_64-efi/affs.mod
./backup/boot_grub/x86_64-efi/reiserfs.mod
./backup/boot_grub/x86_64-efi/lsefimmap.mod
./backup/boot_grub/x86_64-efi/verifiers.mod
./backup/boot_grub/x86_64-efi/video_bochs.mod
./backup/boot_grub/x86_64-efi/videotest_checksum.mod
./backup/boot_grub/x86_64-efi/usbms.mod
./backup/boot_grub/x86_64-efi/date.mod
./backup/boot_grub/x86_64-efi/mdraid09.mod
./backup/boot_grub/x86_64-efi/trig.mod
./backup/boot_grub/x86_64-efi/normal.mod
./backup/boot_grub/x86_64-efi/xnu.mod
./backup/boot_grub/x86_64-efi/pgp.mod
./backup/boot_grub/x86_64-efi/ufs1.mod
./backup/boot_grub/x86_64-efi/xfs.mod
./backup/boot_grub/x86_64-efi/cs5536.mod
./backup/boot_grub/x86_64-efi/gcry_rsa.mod
./backup/boot_grub/x86_64-efi/parttool.mod
./backup/boot_grub/x86_64-efi/gcry_sha512.mod
./backup/boot_grub/x86_64-efi/raid5rec.mod
./backup/boot_grub/x86_64-efi/zfs.mod
./backup/boot_grub/x86_64-efi/gcry_md5.mod
./backup/boot_grub/x86_64-efi/priority_queue.mod
./backup/boot_grub/x86_64-efi/multiboot.mod
./backup/boot_grub/x86_64-efi/font.mod
./backup/boot_grub/x86_64-efi/test.mod
./backup/boot_grub/x86_64-efi/diskfilter.mod
./backup/boot_grub/x86_64-efi/bitmap_scale.mod
./backup/boot_grub/x86_64-efi/backtrace.mod
./backup/boot_grub/x86_64-efi/raid6rec.mod
./backup/boot_grub/x86_64-efi/fshelp.mod
./backup/boot_grub/x86_64-efi/true.mod
./backup/boot_grub/x86_64-efi/test_blockarg.mod
./backup/boot_grub/x86_64-efi/odc.mod
./backup/boot_grub/x86_64-efi/ohci.mod
./backup/boot_grub/x86_64-efi/mpi.mod
./backup/boot_grub/x86_64-efi/hfsplus.mod
./backup/boot_grub/x86_64-efi/efifwsetup.mod
./backup/boot_grub/x86_64-efi/procfs.mod
./backup/boot_grub/x86_64-efi/cbls.mod
./backup/boot_grub/x86_64-efi/testload.mod
./backup/boot_grub/x86_64-efi/ctz_test.mod
./backup/boot_grub/x86_64-efi/wrmsr.mod
./backup/boot_grub/x86_64-efi/fixvideo.mod
./backup/boot_grub/x86_64-efi/iso9660.mod
./backup/boot_grub/x86_64-efi/gcry_des.mod
./backup/boot_grub/x86_64-efi/multiboot2.mod
./backup/boot_grub/x86_64-efi/crc64.mod
./backup/boot_grub/x86_64-efi/exfat.mod
./backup/boot_grub/x86_64-efi/tr.mod
./backup/boot_grub/x86_64-efi/lspci.mod
./backup/boot_grub/x86_64-efi/memrw.mod
./backup/boot_grub/x86_64-efi/part_bsd.mod
./backup/boot_grub/x86_64-efi/signature_test.mod
./backup/boot_grub/x86_64-efi/ufs2.mod
./backup/boot_grub/x86_64-efi/ntfscomp.mod
./backup/boot_grub/x86_64-efi/load.cfg
./backup/boot_grub/x86_64-efi/at_keyboard.mod
./backup/boot_grub/x86_64-efi/msdospart.mod
./backup/boot_grub/x86_64-efi/gcry_rfc2268.mod
./backup/boot_grub/x86_64-efi/hfs.mod
./backup/boot_grub/x86_64-efi/video_fb.mod
./backup/boot_grub/x86_64-efi/bswap_test.mod
./backup/boot_grub/x86_64-efi/zfscrypt.mod
./backup/boot_grub/x86_64-efi/ata.mod
./backup/boot_grub/x86_64-efi/relocator.mod
./backup/boot_grub/x86_64-efi/progress.mod
./backup/boot_grub/x86_64-efi/gettext.mod
./backup/boot_grub/x86_64-efi/cryptodisk.mod
./backup/boot_grub/x86_64-efi/halt.mod
./backup/boot_grub/x86_64-efi/gcry_crc.mod
./backup/boot_grub/x86_64-efi/tpm.mod
./backup/boot_grub/x86_64-efi/linux16.mod
./backup/boot_grub/x86_64-efi/parttool.lst
./backup/boot_grub/x86_64-efi/gcry_md4.mod
./backup/boot_grub/x86_64-efi/search_fs_uuid.mod
./backup/boot_grub/x86_64-efi/cbtable.mod
./backup/boot_grub/x86_64-efi/gcry_twofish.mod
./backup/boot_grub/x86_64-efi/jfs.mod
./backup/boot_grub/x86_64-efi/elf.mod
./backup/boot_grub/x86_64-efi/lzopio.mod
./backup/boot_grub/x86_64-efi/bitmap.mod
./backup/boot_grub/x86_64-efi/png.mod
./backup/boot_grub/x86_64-efi/bfs.mod
./backup/boot_grub/x86_64-efi/geli.mod
./backup/boot_grub/x86_64-efi/usbserial_ftdi.mod
./backup/boot_grub/x86_64-efi/cpuid.mod
./backup/boot_grub/x86_64-efi/div_test.mod
./backup/boot_grub/x86_64-efi/gcry_dsa.mod
./backup/boot_grub/x86_64-efi/efinet.mod
./backup/boot_grub/x86_64-efi/legacycfg.mod
./backup/boot_grub/x86_64-efi/efi_uga.mod
./backup/boot_grub/x86_64-efi/ufs1_be.mod
./backup/boot_grub/x86_64-efi/macbless.mod
./backup/boot_grub/x86_64-efi/aout.mod
./backup/boot_grub/x86_64-efi/cbfs.mod
./backup/boot_grub/x86_64-efi/gcry_rmd160.mod
./backup/boot_grub/x86_64-efi/tar.mod
./backup/boot_grub/x86_64-efi/cbtime.mod
./backup/boot_grub/x86_64-efi/terminal.lst
./backup/boot_grub/x86_64-efi/hfspluscomp.mod
./backup/boot_grub/x86_64-efi/rdmsr.mod
./backup/boot_grub/x86_64-efi/gcry_tiger.mod
./backup/boot_grub/x86_64-efi/offsetio.mod
./backup/boot_grub/x86_64-efi/usbserial_pl2303.mod
./backup/boot_grub/x86_64-efi/syslinuxcfg.mod
./backup/boot_grub/x86_64-efi/crypto.lst
./backup/boot_grub/x86_64-efi/loadenv.mod
./backup/boot_grub/x86_64-efi/mdraid1x.mod
./backup/boot_grub/x86_64-efi/lvm.mod
./backup/boot_grub/x86_64-efi/usb.mod
./backup/boot_grub/x86_64-efi/pata.mod
./backup/boot_grub/x86_64-efi/romfs.mod
./backup/boot_grub/x86_64-efi/minicmd.mod
./backup/boot_grub/x86_64-efi/gfxterm_background.mod
./backup/boot_grub/x86_64-efi/eval.mod
./backup/boot_grub/x86_64-efi/loopback.mod
./backup/boot_grub/x86_64-efi/play.mod
./backup/boot_grub/x86_64-efi/probe.mod
./backup/boot_grub/x86_64-efi/setjmp_test.mod
./backup/boot_grub/x86_64-efi/zfsinfo.mod
./backup/boot_grub/x86_64-efi/lsmmap.mod
./backup/boot_grub/x86_64-efi/partmap.lst
./backup/boot_grub/x86_64-efi/gcry_arcfour.mod
./backup/boot_grub/x86_64-efi/keystatus.mod
./backup/boot_grub/x86_64-efi/minix.mod
./backup/boot_grub/x86_64-efi/cmdline_cat_test.mod
./backup/boot_grub/x86_64-efi/part_dfly.mod
./backup/boot_grub/x86_64-efi/hello.mod
./backup/boot_grub/x86_64-efi/gcry_serpent.mod
./backup/boot_grub/x86_64-efi/lsefi.mod
./backup/boot_grub/x86_64-efi/search_label.mod
./backup/boot_grub/x86_64-efi/btrfs.mod
./backup/boot_grub/x86_64-efi/shim_lock.mod
./backup/boot_grub/x86_64-efi/gcry_rijndael.mod
./backup/boot_grub/x86_64-efi/uhci.mod
./backup/boot_grub/x86_64-efi/hdparm.mod
./backup/boot_grub/x86_64-efi/part_msdos.mod
./backup/boot_grub/x86_64-efi/terminal.mod
./backup/boot_grub/x86_64-efi/ldm.mod
./backup/boot_grub/x86_64-efi/xzio.mod
./backup/boot_grub/x86_64-efi/read.mod
./backup/boot_grub/x86_64-efi/loadbios.mod
./backup/boot_grub/x86_64-efi/iorw.mod
./backup/boot_grub/x86_64-efi/gcry_blowfish.mod
./backup/boot_grub/x86_64-efi/gcry_whirlpool.mod
./backup/boot_grub/x86_64-efi/memdisk.mod
./backup/boot_grub/x86_64-efi/sfs.mod
./backup/boot_grub/x86_64-efi/gzio.mod
./backup/boot_grub/x86_64-efi/udf.mod
./backup/boot_grub/x86_64-efi/gcry_sha256.mod
./backup/boot_grub/x86_64-efi/terminfo.mod
./backup/boot_grub/x86_64-efi/sleep.mod
./backup/boot_grub/x86_64-efi/jpeg.mod
./backup/boot_grub/x86_64-efi/serial.mod
./backup/boot_grub/x86_64-efi/cat.mod
./backup/boot_grub/x86_64-efi/all_video.mod
./backup/boot_grub/x86_64-efi/efi_gop.mod
./backup/boot_grub/x86_64-efi/testspeed.mod
./backup/boot_grub/x86_64-efi/crypto.mod
./backup/boot_grub/x86_64-efi/lsacpi.mod
./backup/boot_grub/x86_64-efi/xnu_uuid_test.mod
./backup/boot_grub/x86_64-efi/videotest.mod
./backup/boot_grub/x86_64-efi/configfile.mod
./backup/boot_grub/x86_64-efi/spkmodem.mod
./backup/boot_grub/x86_64-efi/gcry_camellia.mod
./backup/boot_grub/x86_64-efi/password.mod
./backup/boot_grub/x86_64-efi/disk.mod
./backup/boot_grub/x86_64-efi/minix3.mod
./backup/boot_grub/x86_64-efi/gcry_seed.mod
./backup/boot_grub/x86_64-efi/gcry_sha1.mod
./backup/boot_grub/x86_64-efi/time.mod
./backup/boot_grub/x86_64-efi/gfxterm_menu.mod
./backup/boot_grub/x86_64-efi/file.mod
./backup/boot_grub/x86_64-efi/echo.mod
./backup/boot_grub/x86_64-efi/regexp.mod
./backup/boot_grub/x86_64-efi/search.mod
./backup/boot_grub/x86_64-efi/minix2.mod
./backup/boot_grub/x86_64-efi/net.mod
./backup/boot_grub/x86_64-efi/moddep.lst
./backup/boot_grub/x86_64-efi/tga.mod
./backup/boot_grub/x86_64-efi/tftp.mod
./backup/boot_grub/x86_64-efi/squash4.mod
./backup/boot_grub/x86_64-efi/lsefisystab.mod
./backup/boot_grub/x86_64-efi/mdraid09_be.mod
./backup/boot_grub/x86_64-efi/ntfs.mod
./backup/boot_grub/x86_64-efi/hashsum.mod
./backup/boot_grub/x86_64-efi/lssal.mod
./backup/boot_grub/x86_64-efi/videoinfo.mod
./backup/boot_grub/x86_64-efi/part_dvh.mod
./backup/boot_grub/x86_64-efi/linuxefi.mod
./backup/boot_grub/x86_64-efi/usbserial_common.mod
./backup/boot_grub/x86_64-efi/help.mod
./backup/boot_grub/x86_64-efi/gptsync.mod
./backup/boot_grub/x86_64-efi/zstd.mod
./backup/boot_grub/x86_64-efi/gcry_idea.mod
./backup/boot_grub/x86_64-efi/feftal_test.mod
./backup/boot_grub/x86_64-efi/adler32.mod
./backup/boot_grub/x86_64-efi/minix2_be.mod
./backup/boot_grub/x86_64-efi/part_sunpc.mod
./backup/boot_grub/x86_64-efi/cmp_test.mod
./backup/boot_grub/x86_64-efi/gfxmenu.mod
./backup/boot_grub/x86_64-efi/acpi.mod
./backup/boot_grub/x86_64-efi/setjmp.mod
./backup/boot_grub/x86_64-efi/password_pbkdf2.mod
./backup/boot_grub/x86_64-efi/grub.efi
./backup/boot_grub/x86_64-efi/sleep_test.mod
./backup/boot_grub/x86_64-efi/strtoull_test.mod
./backup/boot_grub/x86_64-efi/appleldr.mod
./backup/boot_grub/x86_64-efi/exfctest.mod
./backup/boot_grub/x86_64-efi/fs.lst
./backup/boot_grub/x86_64-efi/http.mod
./backup/boot_grub/x86_64-efi/gcry_cast5.mod
./backup/boot_grub/x86_64-efi/video.mod
./backup/boot_grub/x86_64-efi/gfxterm.mod
./backup/boot_grub/x86_64-efi/legacy_password_test.mod
./backup/boot_grub/x86_64-efi/afs.mod
./backup/boot_grub/x86_64-efi/extcmd.mod
./backup/boot_grub/x86_64-efi/cpio_be.mod
./backup/boot_grub/x86_64-efi/minix3_be.mod
./backup/boot_grub/x86_64-efi/command.lst
./backup/boot_grub/x86_64-efi/archhelp.mod
./backup/boot_grub/x86_64-efi/pcidump.mod
./backup/boot_grub/fonts
./backup/boot_grub/fonts/unicode.pf2
./backup/etc_grub_d
./backup/etc_grub_d/20_linux_xen
./backup/etc_grub_d/40_custom
./backup/etc_grub_d/41_custom
./backup/etc_grub_d/30_os-prober
./backup/etc_grub_d/00_header
./backup/etc_grub_d/10_linux_zfs
./backup/etc_grub_d/30_uefi-firmware
./backup/etc_grub_d/README
./backup/etc_grub_d/20_memtest86+
./backup/etc_grub_d/05_debian_theme
./backup/etc_grub_d/10_linux
./backup/RESTORE_INSTRUCTIONS