我有一台旧的 HP Compaq 笔记本电脑,我想升级它,因为里面的 IDE 硬盘快要坏了。之前我曾在这台电脑上设置了 Windows XP / Lubuntu 14 双启动。使用 Rescuezilla 将驱动器克隆到带有 IDE 适配器的 mSata SSD 并调整分区大小后,我无法再启动 Lubuntu。
Windows XP 启动正常(在第一次尝试时出现问题并运行 checkdisk 后),但我无法通过 Grub for Lubuntu。它抱怨attempt to read or write outside of disk 'hd0'
内核未加载。Grub 是不是处于救援模式。
我没有直接克隆分区,因为我想使用新 SSD 的全部大小(除了一些保留空间),并且 Linux 的分区只有几 GB。
Grub ls 输出:(hd0) (hd0,msdos5) (hd0,msdos1)
我的分区如下(MBR):
- 主分区 / MSDOS1 - Windows XP
- 扩展分区
- Linux 主分区 / MSDOS5
- 交换分区
以下是我迄今为止尝试过的:
- 使用 GParted 检查分区错误
set root=(hd0,msdos5)
使用和从 Grub 手动启动linux *** root=/dev/sda5
,会抛出与常规尝试相同的错误。- 使用 Rescuezilla 重新安装 Grub:
sudo mount /dev/sda5 /mnt
sudo grub-install --boot-directory=/mnt/boot /dev/sda
- 从实时 USB 重新安装 Linux,未检测到 SSD(抱怨
failed to set xfermode (err_mask=0x40)
和ata1: SRST failed
)
笔记:
- 我费了好大劲才尝试移动我的分区以便它们能够在 SSD 上对齐,我听说这样会缩短设备的使用寿命,特别是在没有 SSD 支持的旧操作系统上(因为我运行的是 Win XP 作为第一次启动)
- Windows XP 和 Rescuezilla 2 运行良好,但我无法通过 Live USB 检测到任何其他操作系统的硬盘。甚至 Rescuezilla 1 也无法工作。
- Memtest 和 HDD 测试运行良好
- 系统:HP Compaq nx6110、1.73 GHZ Pentium M、1.5 GB DDR 内存、60 GB IDE(44 针)富士通硬盘(现已更换)、256 GB 金士顿 mSata SSD,带 mSata 至 IDE 44 针适配器
*编辑:我尝试了 boot-repair-iso,但遇到了同样的问题。我将日志上传到 PasteBin,如下所示:
- 系统控制:https://pastebin.com/tAy14guQ
- 日志控制:https://pastebin.com/8MvPumLe
- 启动修复日志:
boot-repair-4ppa2075 [20240129_1152]
============================== Boot Info Summary ===============================
=> Grub2 (v2.00) is installed in the MBR of /dev/sda and looks at sector 1 of
the same hard drive for core.img. core.img is at this location and looks
for (,2)/grub. It also embeds following components:
modules
---------------------------------------------------------------------------
offsetio extcmd macho elf file gettext boot bufio verifiers crypto
terminal normal datetime date mmap drivemap blocklist archelp newc
vga_text relocator video chain ntldr search_label search_fs_file
search_fs_uuid search keylayouts at_keyboard pci usb usb_keyboard gcry_md5
hashsum gcry_crc gzio xzio lzopio lspci fshelp ext2 xfs acpi reboot
iso9660 gcry_sha1 div udf exfat font diskfilter raid6rec zstd btrfs ventoy
read halt video_fb vbe linux linux16 test true sleep echo bitmap gfxterm
bitmap_scale trig video_colors gfxmenu videotest videoinfo functional_test
videotest_checksum video_cirrus video_bochs vga minicmd help configfile tr
biosdisk disk ls tar zfs squash4 pbkdf2 gcry_sha512 password_pbkdf2
all_video png jpeg part_gpt part_msdos fat ntfs loopback
gfxterm_background procfs gfxterm_menu smbios
---------------------------------------------------------------------------
sda1: __________________________________________________________________________
File system: exfat
Boot sector type: -
Boot sector info:
Mounting failed: fuse: mount failed: Device or resource busy
sda2: __________________________________________________________________________
File system: iso9660
Boot sector type: Unknown
Boot sector info:
Operating System:
Boot files: /boot/grub/grub.cfg
================================ 0 OS detected =================================
================================ Host/Hardware =================================
CPU architecture: 32-bit
Video: Mobile 915GM/GMS/910GML Express Graphics Controller Mobile 915GM/GMS/910GML Express Graphics Controller from Intel Corporation Intel Corporation
Live-session OS is Ubuntu 32-bit (Boot-Repair-Disk 32bit 20211212, bionic, i686)
===================================== UEFI =====================================
BIOS/UEFI firmware: 68DTD Ver. F.13 from Hewlett-Packard
This live-session is in Legacy/BIOS/CSM mode (not in EFI mode).
============================= Drive/Partition Info =============================
Disks info: ____________________________________________________________________
Partitions info (1/3): _________________________________________________________
Partitions info (2/3): _________________________________________________________
Partitions info (3/3): _________________________________________________________
fdisk -l (filtered): ___________________________________________________________
Disk sda: 57.3 GiB, 61505273856 bytes, 120127488 sectors
Disk identifier: 0x8a46cb63
Boot Start End Sectors Size Id Type
sda1 * 2048 120061951 120059904 57.3G 7 HPFS/NTFS/exFAT
sda2 120061952 120127487 65536 32M ef EFI (FAT-12/16/32)
Disk dm-0: 930 MiB, 975175680 bytes, 1904640 sectors
Disk identifier: 0x25aca9fd
Boot Start End Sectors Size Id Type
dm-0p1 * 0 1904639 1904640 930M 17 Hidden HPFS/NTFS
Disk zram0: 746 MiB, 782217216 bytes, 190971 sectors
parted -lm (filtered): _________________________________________________________
sda:61.5GB:scsi:512:512:msdos: USB SanDisk 3.2Gen1:;
1:1049kB:61.5GB:61.5GB:::boot;
2:61.5GB:61.5GB:33.6MB:fat16::esp;
blkid (filtered): ______________________________________________________________
NAME FSTYPE UUID PARTUUID LABEL PARTLABEL
sda
├─sda1 exfat 4E21-0000 8a46cb63-01 Ventoy
└─sda2 iso9660 2021-12-15-23-51-16-00 Boot-Repair-Disk 32bit
Mount points (filtered): _______________________________________________________
Avail Use% Mounted on
/dev/mapper/ventoy 0 100% /cdrom
/dev/sda2 0 100% /media/lubuntu/Boot-Repair-Disk 32bit
Mount options (filtered): ______________________________________________________
/dev/mapper/ventoy iso9660 ro,noatime,nojoliet,check=s,map=n,blocksize=2048
/dev/sda2 iso9660 ro,nosuid,nodev,relatime,nojoliet,check=s,map=n,blocksize=2048
====================== sda2/boot/grub/grub.cfg (filtered) ======================
==================== sda2: Location of files loaded by Grub ====================
GiB - GB File Fragment(s)
?? = ?? boot/grub/grub.cfg 1
======================== Unknown MBRs/Boot Sectors/etc =========================
Unknown BootLoader on sda2
Suggested repair: ______________________________________________________________
The default repair of the Boot-Repair utility would not act on the boot.
*编辑 2:我启动了 Rescuezilla 2,以下是我在启动时发现的一些有趣的差异:
- 老的:
jan 29 11:51:28 lubuntu kernel: ata1.00: qc timeout (cmd 0x47)
jan 29 11:51:28 lubuntu kernel: ata1.00: READ LOG DMA EXT failed, trying PIO
jan 29 11:51:28 lubuntu kernel: ata1.00: ATA Identify Device Log not supported
jan 29 11:51:28 lubuntu kernel: ata1.00: Security Log not supported
jan 29 11:51:28 lubuntu kernel: ata1.01: ATAPI: MATSHITAUJ-840D, 1.02, max MWDMA2
jan 29 11:51:28 lubuntu kernel: ata1.00: failed to set xfermode (err_mask=0x40)
jan 29 11:51:28 lubuntu kernel: ata1: link is slow to respond, please be patient (ready=0)
jan 29 11:51:28 lubuntu kernel: ata1: SRST failed (errno=-16)
jan 29 11:51:28 lubuntu kernel: ata1: link is slow to respond, please be patient (ready=0)
jan 29 11:51:28 lubuntu kernel: ata1: SRST failed (errno=-16)
jan 29 11:51:28 lubuntu kernel: ata1: link is slow to respond, please be patient (ready=0)
jan 29 11:51:28 lubuntu kernel: ata1: SRST failed (errno=-16)
jan 29 11:51:28 lubuntu kernel: ata1: SRST failed (errno=-16)
jan 29 11:51:28 lubuntu kernel: ata1: reset failed, giving up
jan 29 11:51:28 lubuntu kernel: ata1.00: disabled
jan 29 11:51:28 lubuntu kernel: ata1.01: disabled
- 在 Rescuezilla 上:
jan 29 12:07:01 ubuntu kernel: ata1: lost interrupt (Status 0x58)
jan 29 12:07:01 ubuntu kernel: ata1: drained 65536 bytes to clear DRQ
jan 29 12:07:01 ubuntu kernel: ata1.00: supports DRM functions and may not be fully accessible
jan 29 12:07:01 ubuntu kernel: ata1.00: supports DRM functions and may not be fully accessible
jan 29 12:07:01 ubuntu kernel: ata1.00: device reported invalid CHS sector 0
jan 29 12:07:01 ubuntu kernel: sd 0:0:0:0: [sda] Attached SCSI disk
jan 29 12:07:01 ubuntu kernel: sda: detected capacity change from 0 to 256060514304
答案1
我认为我基本上已经解决了我的问题。我做了以下事情:
- 从实时 USB 启动 Rescuezille 2
- 移动我的分区,以便在主 Windows 分区之前有 1 GB 的空间
- 在那里创建一个空的 ext4 分区并在其上设置可启动标志
- 安装启动修复并运行它;选择高级选项
- 在高级选项中我指定了新创建的分区,因此 Grub 会安装在那里
- 并检查了旧 bios 选项的修复
- 我运行了它
现在我成功地在 SSD 上启动了 Lubuntu!