Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I had a bootable USB key witk ubuntustudio with two partitions:

  1. /dev/sdb1 with Ubuntu
  2. and a fat32 /dev/sdb2.

Then I realized that Windows only reads partitions if they are the first. So I moved the partitions and now I have ubuntu on /dev/sdb2 and fat32 on /dev/sdb1. I made this creating an image of the old /dev/sdb1 with ubuntu by dd command and then restoring it on the new /dev/sdb2 with dd again.

So obviously now the USB pen fails to reboot and give me the grub rescue prompt I made this, after having verified that the vmlinuz and initrd files are in (hd0,msdos2) partition:

grub rescue>  set root=(hd0,msdos2)/boot  
grub rescue>  insmod linux  
grub rescue>  linux (hd0,msdos2)/boot/vmlinuz-3.5.0-17-lowlatency  
grub rescue>  initrd (hd0,msdos2)/boot/initrd.img-3.5.0-17-lowlatency  
grub rescue>  boot

When I boot I fall into initramfs prompt. I think that is because the /dev/sdb2 is not mounted. Because after the boot command I get:

mount:can't read 'etc/fstab': No such file or directory  
Begin: Running /scripts/init-bottom ... mounting /dev on /root/dev failed: No such file or directory 

But how can I tell to grub which is the new partition from inside grub rescue prompt?

share|improve this question
add comment

1 Answer

On dev/sdb2 (your ubuntu partition) you need to edit and update /etc/fstab

You can do this by mounting the partition under Ubuntu and using gedit.

Update the root partition to point to the new partition.

You will then need to update grub.

share|improve this answer
    
The /etc/fstab on actual /dev/sdb2 is UUID=23b36b1b-d937-4f07-8b8a-4f038ca12384 / ext4 errors=remount-ro 0 1 UUID=A4DA-D605 /windows vfat utf8,umask=007,gid=46 0 1 UUID=9648f4d6-55ac-457a-a241-9be725b5db96 none swap sw 0 0 and the UUID of /dev/sdb2 is unchanged; The output from blkid is /dev/sdb2: UUID="23b36b1b-d937-4f07-8b8a-4f038ca12384" TYPE="ext4" So what should I change? –  Manticore Feb 20 '13 at 16:47
    
fstab looks good, re-install grub help.ubuntu.com/community/Boot-Repair –  bodhi.zazen Feb 20 '13 at 17:13
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.