0

It looks like I totally blew my boot menu to bits while I was trying to update it after removing two unknown partitions left from a previous ubuntu installation with live usb. I accidentally sent the grub to sdc instead of sda and now the computer can't find the partition list. Sda1 is misplaced, but not gone, and sda6 is Ubuntu 16.04. I thought I could get the grub back by reinstalling Ubuntu 14.04, but it unmounted Windows before I could stop it. All I get is minimal bin-bash grub if I start it up normally. I have to use a live usb with 14.04 because I corrupted the 16.04 drive I was using when I screwed up. Is there a way to save this disaster so that I can at least start it up again? I would very much appreciate any help. Here's an idea of what's going on:

ubuntu@ubuntu:~$ sudo blkid -o list 
device     fs_type label    mount point    UUID

/dev/loop0 squashfs         /rofs          
/dev/sda1  ntfs    PQSERVICE (not mounted) DE221B70221B4CC1
/dev/sda2  ntfs    SYSTEM RESERVED (not mounted) 4CF01BBFF01BAE68
/dev/sda3  ntfs    Acer     (not mounted)  08EA1D44EA1D3004
/dev/sda5  swap             <swap>         e9ad90ad-f73a-49b0-           b3fb-a4ae29b3aac7
/dev/sda6  ext4             (not mounted)  7021ee40-917c-4354-8fce-01e3cf0f1858
/dev/sdb1  vfat    UBUNTU 1404 /cdrom      8699-B94C

ubuntu@ubuntu:~$ sudo mount /dev/sda6 /mnt
\ubuntu@ubuntu:~$ sudo mount --bind /dev /mnt/dev &&
> sudo mount --bind /proc /mnt/proc &&
> sudo mount --bind /sys /mnt/sys

ubuntu@ubuntu:~$ sudo chroot /mnt

root@ubuntu:/# grub-install /dev/sda
Installing for i386-pc platform.
/proc/devices: fopen failed: No such file or directory
device node not found
/proc/devices: fopen failed: No such file or directory
device node not found
grub-install: warning: Sector 18 is already in use by the program`Acer    registration utility (?)'; avoiding it.  This software may cause boot or  other problems in future.  Please ask its authors not to store data in the boot track.
grub-install: warning: Sector 32 is already in use by the program    `FlexNet'; avoiding it.  This software may cause boot or other problems in  future.  Please ask its authors not to store data in the boot track.
Installation finished. No error reported.
root@ubuntu:/# 

ubuntu@ubuntu:~$ df
Filesystem     1K-blocks     Used Available Use% Mounted on
    /cow             2888496    81328   2807168   3% /
    /dev             2877008       12   2876996   1% /mnt/dev
    tmpfs             577700     1288    576412   1% /run
    /dev/sdb1        7801432  1046440   6754992  14% /cdrom
    /dev/loop0        975872   975872         0 100% /rofs
    none                   4        0         4   0% /sys/fs/cgroup
    tmpfs            2888496     1072   2887424   1% /tmp
    none                5120        4      5116   1% /run/lock
    none             2888496       80   2888416   1% /run/shm
    none              102400       84    102316   1% /run/user
    /dev/sda6      118658332 11728020 100879752  11% /mnt

ubuntu@ubuntu:~$ sudo parted -ls  # ... space minus ell ess
Model: ATA WDC WD6400BEVT-2 (scsi)
Disk /dev/sda: 640GB
Sector size (logical/physical): 512B/512B
Partition Table: msdo

Number  Start   End     Size    Type      File system     Flags
     1      1049kB  15.0GB  15.0GB  primary   ntfs            diag
     2      15.0GB  15.1GB  105MB   primary   ntfs            boot
     3      15.1GB  249GB   234GB   primary   ntfs
     4      249GB   640GB   391GB   extended
     6      249GB   373GB   124GB   logical   ext4
     5      373GB   379GB   6091MB  logical   linux-swap(v1)


Model: SanDisk Cruzer Glide (scsi)
Disk /dev/sdb: 8004MB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start   End     Size    Type     File system  Flags
     1      16.4kB  8004MB  8004MB  primary  fat32        boot


ubuntu@ubuntu:~$ sudo lsblk -fm
NAME   FSTYPE   LABEL           MOUNTPOINT NAME     SIZE OWNER GROUP MODE
    sda                                        sda    596.2G root  disk  brw-rw----
    ├─sda1 ntfs     PQSERVICE                  ├─sda1    14G root  disk  brw-rw----
    ├─sda2 ntfs     SYSTEM RESERVED            ├─sda2   100M root  disk  brw-rw----
    ├─sda3 ntfs     Acer                       ├─sda3 218.1G root  disk  brw-rw----
    ├─sda4                                     ├─sda4     1K root  disk  brw-rw----
    ├─sda5 swap                     [SWAP]     ├─sda5   5.7G root  disk  brw-rw----
    └─sda6 ext4                     /mnt       └─sda6 115.1G root  disk  brw-rw----
    sdb                                        sdb      7.5G root  disk  brw-rw----
    └─sdb1 vfat     UBUNTU 1404     /cdrom     └─sdb1   7.5G root  disk  brw-rw----
    sr0                                        sr0     1024M root  cdrom brw-rw----
    loop0  squashfs                 /rofs      loop0    953M root  disk  brw-rw----

ubuntu@ubuntu:~$ ls -F /boot/grub
gfxblacklist.txt  grubenv

ubuntu@ubuntu:~$ sudo mount /dev/sda1 /mnt
The disk contains an unclean file system (0, 0).
Metadata kept in Windows cache, refused to mount.
Failed to mount '/dev/sda1': Operation not permitted
The NTFS partition is in an unsafe state. Please resume and shutdown
Windows fully (no hibernation or fast restarting), or mount the volume
read-only with the 'ro' mount option.
John
  • 35
  • 2
  • 3
  • 6
  • 2
    "Please resume and shutdown Windows fully (no hibernation or fast restarting)" Duplicate http://askubuntu.com/questions/145902/unable-to-mount-windows-ntfs-filesystem-due-to-hibernation – Mark Kirby Aug 18 '16 at 17:43
  • 1
    In addition you may need to temporarily install Windows boot loader to boot Windows. Grub will not boot hibernated Windows. And you may need fsck on sda6. And full reinstall of grub. fsck: http://askubuntu.com/questions/642504/ubuntu-14-04-is-not-booting-normaly-after-a-manual-hard-boot/642789#642789 Boot-Repair to reinstall boot loaders, use advanced mode and full reinstall of grub after fixing Windows: https://help.ubuntu.com/community/Boot-Repair – oldfred Aug 18 '16 at 17:47
  • 1
    Have you tried this? http://askubuntu.com/a/182863/32548 – Chris Carter Aug 18 '16 at 17:48
  • /dev/sda1 appears to be your acer diagnostics partition. /dev/sda2 appears to have your windows boot partition. Your Windows installation appears to reside on /dev/sda3. The first thing you should do is backup all critical data on the system so that you don't make things worse. – Elder Geek Aug 18 '16 at 17:51

1 Answers1

0

Problem solved. I wiped out the disk and reinstalled Ubuntu. Though I lost Windows and everything else, the computer works fine now. I learned to never ever mess with anything that might affect grub. Just leave those unknown partitions alone...

John
  • 35
  • 2
  • 3
  • 6