我应该将我的 iso 写入 /dev/sda1 还是 /dev/sdb1?如果我做错了会发生什么,我可以恢复吗?

我应该将我的 iso 写入 /dev/sda1 还是 /dev/sdb1?如果我做错了会发生什么,我可以恢复吗?

我犯了一个错误,意识到我应该选择 /dev/sdb1 而不是 /dev/sda1。我自己的系统做了一些事情。但我该如何恢复呢?(我确信如果我重新启动系统,我将无法重新登录)。

这就是我所做的,试图使 USB 可启动,但我将其放到了 sda1:

# livecd-iso-to-disk ubuntu-11.04-desktop-amd64.iso /dev/sda1
Verifying image...

The media check is complete, the result is: NA.

No checksum information available, unable to verify media.
Are you SURE you want to continue?
Press Enter to continue or ctrl-c to abort

/dev/sda1 is mounted, please unmount for safety
Cleaning up to exit...

# umount /dev/sda1
# livecd-iso-to-disk ubuntu-11.04-desktop-amd64.iso /dev/sda1
Verifying image...

The media check is complete, the result is: NA.

No checksum information available, unable to verify media.
Are you SURE you want to continue?
Press Enter to continue or ctrl-c to abort

ubuntu-11.04-desktop-amd64.iso uses initrd.img w/o install.img
Copying DVD image to target device.
Updating boot config file
Installing boot loader
/media/tgttmp.WBEQ4L/syslinux is device /dev/sda1
Target device is now set up with a Live image!

跟进:

当 /boot 为空时,我迷路了,无法逆转。我刚刚用我的另一个 CentOS 盒子验证了一下,里面有很多东西:

$ ls
config-2.6.32-71.29.1.el6.x86_64  initramfs-2.6.32-71.29.1.el6.x86_64.img  symvers-2.6.32-71.el6.x86_64.gz       vmlinuz-2.6.32-71.el6.x86_64
config-2.6.32-71.el6.x86_64       initramfs-2.6.32-71.el6.x86_64.img       System.map-2.6.32-71.29.1.el6.x86_64
efi                               lost+found                               System.map-2.6.32-71.el6.x86_64
grub                              symvers-2.6.32-71.29.1.el6.x86_64.gz     vmlinuz-2.6.32-71.29.1.el6.x86_64

而我当前的系统在发生错误之后是:

$ ls
bin   cgroup  etc         home  lost+found  misc  opt   root  sbin     srv  tmp        usr
boot  dev     folders.db  lib   media       mnt   proc  run   selinux  sys  trace.txt  var

$ ll /boot
total 0

现在最好的办法是备份并安装 Fedora 16。下次不要再对 sda1 和 sdb1 犯同样的错误

答案1

因为/dev/sda1这是您的启动分区,所以您所要做的就是重新安装启动加载程序,在 Fedora 15 中,这很可能是 GRUB。

你可以找到很多指南,比如。但是,如果您livecd-iso-to-disk没有删除分区中的文件,那么您要做的就是:

  1. 以 root 身份发出grub,它会给你 grub 提示符
  2. root (hd0, 1)
  3. setup (hd0)

相关内容