/dev/sda1 or /dev/sdb1 i should write my iso? If i do wrong what will happen, can i reverse back?

0

I did a mistake and realized i would have choosen /dev/sdb1 instead of /dev/sda1. My own system i did something. But how can i reverse back? (i am sure if i reboot my system i wont be able to login back).

This is what i did, was trying to make a usb bootable, but i put it to 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!

Follow up:

When /boot is empty i am lost, i can not reverse. I just verified with my other CentOS box which contain lot of stuffs:

$ 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

Where as my current system after the mistake is:

$ 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

Best thing to do is now backup and install Fedora 16. Never do the same mistake next time with sda1 and sdb1

YumYumYum

Posted 2012-01-08T09:58:19.327

Reputation: 1 399

1what was on sda1? Your current OS? – KovBal – 2012-01-08T10:09:19.970

@KovBal: Yes that is my laptop disk. – YumYumYum – 2012-01-08T10:17:56.353

Which filesystem was sda1? – Darokthar – 2012-01-08T10:18:46.243

How could you unmounted it with umount /dev/sda1 ? There must be open files on it... – KovBal – 2012-01-08T10:19:09.830

@Darokthar: /dev/sda1 on /boot type ext4 (rw,relatime,user_xattr,barrier=1,data=ordered) – YumYumYum – 2012-01-08T10:21:32.237

@KovBal: /boot is empty now. – YumYumYum – 2012-01-08T10:24:01.143

Answers

2

Because /dev/sda1 is your boot partition, all you have to do is reinstall the boot loader, which was most likely GRUB in Fedora 15.

You can find numerous guides, like this. However, if livecd-iso-to-disk did not removed your files in the partition, than all you have to do is:

  1. issue grub as root, it gives you the grub prompt
  2. root (hd0, 1)
  3. setup (hd0)

KovBal

Posted 2012-01-08T09:58:19.327

Reputation: 1 250

If /boot is empty, than it takes a little more than that, like reinstalling the kernel. – KovBal – 2012-01-08T10:31:09.030

As of this moment, after using livecd-iso-to-disk, my /boot is completely empty. – YumYumYum – 2012-01-08T10:43:30.153

Thanks, i will backup now all, and install Fedora 16. I lose my Fedora 15, for this mistake. – YumYumYum – 2012-01-08T10:53:38.220