I used a USB flash drive to install an earlier version of Ubuntu6. During this period, I found an episode. The installer recognized the USB flash drive as sda and recognized the hard disk as sdb, finally, the grub is directly installed on the sda, that is, the USB flash disk, resulting in Boot failure... so I found a Ubuntu LiveCD and used it to boot the system. Then I found/etc/fstab, changed the following mount point from sdb to sda, and then to/boot/grub/menu. in lst, find the following content: title & n
I used a USB flash drive to install an earlier version of Ubuntu 6, during which I found an episode. The installer recognized the USB flash drive as sda and the hard disk as sdb, finally, the grub is directly installed on the sda, that is, the USB flash disk, resulting in Boot failure...
So I found a Ubuntu Live CD and used it to boot the system. Then I found/etc/fstab and changed the following mount point from sdb to sda, then to/boot/grub/menu. find the following content in lst:
Title Ubuntu, kernel 2.6.18
Root (hd1, 1) # indicates to boot from the second partition of the second Hard Disk
Kernel/boot/vmlinuz-2.6.18 root =/dev/sdb2 ro quiet splash
Initrd/boot/initrd. img-2.6.18
Savedefault
Boot
Title Ubuntu, kernel 2.6.18 (recovery mode)
Root (hd1, 1)
Kernel/boot/vmlinuz-2.6.18 root =/dev/sdb2 ro single
Initrd/boot/initrd. img-2.6.18
Boot
Title Ubuntu, memtest86 +
Root (hd1, 1)
Kernel/boot/memtest86 +. bin
Boot
Replace hd1 with hd0,
Replace/dev/sdb2 with/dev/sda2 (I have set a swap partition, so/mounted to the second partition)
Finally, install grub on/dev/sda and run
Grub-install/dev/sda
Restart to restore everything to normal