2025年11月7日星期五

家品電器

2025:
2025.11.07(五) hp電腦 CORE i5 $833.00 救世軍家品店(太子)


Booting from the GRUB Command Line (Manual/Rescue Method)

grub> ls
# Example output: (hd0) (hd0,gpt1) (hd0,gpt2) ...
grub> ls (hd0,gpt2)/

# Look for the /boot directory or vmlinuz/initrd files
Repeat ls (hdX,gpty)/ until you find the correct partition.

Set the root partition: Once you identify the correct partition (e.g., (hd0,gpt2)), set it as the root for the boot process.

grub> set root=(hd0,gpt2)
Load the Linux kernel: Use the linux command to specify the kernel file. Use the Tab key for auto-completion to get the correct version name. You must also specify the root filesystem location using its device name (e.g., /dev/sda2) on the same line.

grub> linux /boot/vmlinuz--<version> root=/dev/sda2

(Note: hd0,gpt2 in GRUB naming often corresponds to /dev/sda2 in Linux naming)

Load the initial RAM disk (initrd): Similarly, load the initrd image, again using Tab for auto-completion.

grub> initrd /boot/initrd.img-<version>
Boot the system: Execute the boot command.

grub> boot



config-6.14.0-29-generic initrd.img.old
config-6.14.0-36-generic System.map-6.14.0-29-generic
config-6.14.0-37-generic System.map-6.14.0-36-generic
efi System.map-6.14.0-37-generic
grub vmlinuz
initrd.img vmlinuz-6.14.0-29-generic
initrd.img-6.14.0-29-generic vmlinuz-6.14.0-36-generic
initrd.img-6.14.0-36-generic vmlinuz-6.14.0-37-generic
initrd.img-6.14.0-37-generic vmlinuz.old


👆回頂