Announcement

Collapse
No announcement yet.

Grub Help.

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    #16
    Originally posted by Snowhog View Post
    The guy's rather extraordinary, IMHO. Give him a chance to see if he can help you here.
    You're too kind. :blush:

    Comment


      #17
      Thank you for responding. As Snowhog suggested I've done nothing other than the
      Code:
      sudo fdisk -l
      code suggested by Oshunluvr. I've physically disconnected all internal drives and have a functioning install of 13.04 on 16gbUSB drive.
      Code:
      cat /proc/version
      gave
      Code:
      Linux version 3.8.0-27-generic (buildd@roseapple) (gcc version 4.7.3 (Ubuntu/Linaro 4.7.3-1ubuntu1) ) #40-Ubuntu SMP Tue Jul 9 00:17:05 UTC 2013
      I'll reconnect the drive in question as I absolutely have to recover, so Yes I would like to continue.
      Once again thanks for your help. Even if I just recover the 12.04 partition I'll be extremely happy.
      Last edited by phonic-otg; Aug 05, 2013, 05:05 AM.

      Comment


        #18
        Alright. This thread has become a bit cloudy, especially with respect to which drives matter for your recovery effort. Can you please describe the current state of your machine:

        * Which drive(s) are mounted internally, if any
        * Which drive(s) are in external enclosures, if any
        * How you connect external drives to your computer
        * Which drive(s) contain data you wish to recover
        * Anything else relevant about your configuration

        Comment


          #19
          My 320GB drive is the one I need to restore.
          For clarity, I had initially wanted to try 13.04 installed on a 500gb external (cased) Drive without install to main internal drive (sda). After the install to the 500gb drive, a reboot put Grub in rescue mode. I wrote a request (this one) for help whilst investigating the issue of not being able to boot to the 500gb drive.
          Whilst investigating I'd come across a few posts where you had praised rEFInd as an alternative boot manager. I thought maybe rEFInd will work better than grub and decided to give it a go. As you described to me later
          your post #5, tell me that while your machine is UEFI capable, none of your operating systems have been installed in UEFI mode.
          , I was unaware of the installs being in different modes(now I do).
          Whilst waiting on either a grub or rEFInd response from the community I disconnected the 500gb drive and decided to try installing on a thumb drive (16gb). With the 13.04 live usb (7.5gb) I had booted to. I chose to "install" rather than "try", and bam the gui shrunk to tiny font, I clicked ok twice in that mode but decided to stop and quit, Gui returned to normal, then went into "try" loaded the 13.04 and installed to 16gb. I had configured some software from Muon and rebooted, being a little slow with the F8 key the machine booted to sda and I received the "missing operating system" message.

          Code:
          fdisk -l
          Code:
          Disk /dev/sda: 320.1 GB, 320072933376 bytes
          255 heads, 63 sectors/track, 38913 cylinders, total 625142448 sectors
          Units = sectors of 1 * 512 = 512 bytes
          Sector size (logical/physical): 512 bytes / 512 bytes
          I/O size (minimum/optimal): 512 bytes / 512 bytes
          Disk identifier: 0x000605cf
          
             Device Boot      Start         End      Blocks   Id  System
          /dev/sda1   *        2048      499711      248832   83  Linux
          /dev/sda2          501758   625141759   312320001    5  Extended
          /dev/sda5          501760   625141759   312320000   8e  Linux LVM
          
          
          Disk /dev/sdb: 2000.4 GB, 2000398934016 bytes
          255 heads, 63 sectors/track, 243201 cylinders, total 3907029168 sectors
          Units = sectors of 1 * 512 = 512 bytes
          Sector size (logical/physical): 512 bytes / 4096 bytes
          I/O size (minimum/optimal): 4096 bytes / 4096 bytes
          Disk identifier: 0x0002f740
          
             Device Boot      Start         End      Blocks   Id  System
          /dev/sdb1   *          63  3907024064  1953512001   83  Linux
          Partition 1 does not start on a physical sector boundary.
          
          
          Disk /dev/sdc: 2000.4 GB, 2000398934016 bytes
          255 heads, 63 sectors/track, 243201 cylinders, total 3907029168 sectors
          Units = sectors of 1 * 512 = 512 bytes
          Sector size (logical/physical): 512 bytes / 512 bytes
          I/O size (minimum/optimal): 512 bytes / 512 bytes
          Disk identifier: 0x0007f359
          
             Device Boot      Start         End      Blocks   Id  System
          /dev/sdc1   *          63  3907024064  1953512001    b  W95 FAT32
          
          
          Disk /dev/mapper/kubuntu--vg-root: 315.5 GB, 315503935488 bytes
          255 heads, 63 sectors/track, 38357 cylinders, total 616218624 sectors
          Units = sectors of 1 * 512 = 512 bytes
          Sector size (logical/physical): 512 bytes / 512 bytes
          I/O size (minimum/optimal): 512 bytes / 512 bytes
          Disk identifier: 0x00000000
          
          Disk /dev/mapper/kubuntu--vg-root doesn't contain a valid partition table
          
          
          Disk /dev/mapper/kubuntu--vg-swap_1: 4290 MB, 4290772992 bytes
          255 heads, 63 sectors/track, 521 cylinders, total 8380416 sectors
          Units = sectors of 1 * 512 = 512 bytes
          Sector size (logical/physical): 512 bytes / 512 bytes
          I/O size (minimum/optimal): 512 bytes / 512 bytes
          Disk identifier: 0x00000000
          
          Disk /dev/mapper/kubuntu--vg-swap_1 doesn't contain a valid partition table
          
          
          Disk /dev/sdd: 16.0 GB, 16008609792 bytes
          255 heads, 63 sectors/track, 1946 cylinders, total 31266816 sectors
          Units = sectors of 1 * 512 = 512 bytes
          Sector size (logical/physical): 512 bytes / 512 bytes
          I/O size (minimum/optimal): 512 bytes / 512 bytes
          Disk identifier: 0x000101ca
          
             Device Boot      Start         End      Blocks   Id  System
          /dev/sdd1   *        2048    22878207    11438080   83  Linux
          /dev/sdd2        22880254    31264767     4192257    5  Extended
          /dev/sdd5        22880256    31264767     4192256   82  Linux swap / Solaris
          
          
          Disk /dev/sde: 500.1 GB, 500107862016 bytes
          255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors
          Units = sectors of 1 * 512 = 512 bytes
          Sector size (logical/physical): 512 bytes / 512 bytes
          I/O size (minimum/optimal): 512 bytes / 512 bytes
          Disk identifier: 0x000594fb
          
             Device Boot      Start         End      Blocks   Id  System
          /dev/sde1   *        2048   968384511   484191232   83  Linux
          /dev/sde2       968386558   976771071     4192257    5  Extended
          /dev/sde5       968386560   976771071     4192256   82  Linux swap / Solaris
          The original map (with functioning 12.04 on sda) is earlier in this post on pg 1.
          320Gb drive is internal sata connection, (had my 12.04 install containing my life and a multi-media partition for music movies) seems to have a 13.04 lvm file structure now
          2 x 2Tb drives also sata internal (no OS only for data storage)
          16Gb usb drive external (flash/thumb/key/dongal) with 13.04 installed and running well.
          500Gb drive external (cased)
          Last edited by SteveRiley; Aug 05, 2013, 09:30 PM.

          Comment


            #20
            We are going to have to perform some discovery first. Detach the external 500 GB drive. Insert and boot the 16 GB USB drive. Open a console window. Type:
            Code:
            lsblk --all
            
            pvs --all
            Do you recall how /dev/sda (the 320 GB) drive was partitioned previously?
            Last edited by SteveRiley; Aug 05, 2013, 09:47 PM.

            Comment


              #21
              In regards to recollection of 320gb partioning I really thought there was an fdisk readout in post#5
              I seem to recall MediaNova partition being being sda1 and 230gb, with Nova11 being sda2 and with linux 12.04 around 60gb, sda 5 was swap HERE has some fairly recent information from my system though I don't know how valuable in relation to partitioning it will reveal.
              Code:
              lsblk --all
              Code:
              NAME                          MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
              sda                             8:0    0 298.1G  0 disk 
              ├─sda1                          8:1    0   243M  0 part /media/0ddc4b42-78f1-448f-affc-20fc958709
              ├─sda2                          8:2    0     1K  0 part 
              └─sda5                          8:5    0 297.9G  0 part 
                ├─kubuntu--vg-root (dm-0)   252:0    0 293.9G  0 lvm  
                └─kubuntu--vg-swap_1 (dm-1) 252:1    0     4G  0 lvm  
              sdb                             8:16   0   1.8T  0 disk 
              └─sdb1                          8:17   0   1.8T  0 part 
              sdc                             8:32   0   1.8T  0 disk 
              └─sdc1                          8:33   0   1.8T  0 part 
              sdd                             8:48   1  14.9G  0 disk 
              ├─sdd1                          8:49   1  10.9G  0 part /
              ├─sdd2                          8:50   1     1K  0 part 
              └─sdd5                          8:53   1     4G  0 part [SWAP]
              sr0                            11:0    1  1024M  0 rom  
              ram0                            1:0    0    64M  0 disk 
              ram1                            1:1    0    64M  0 disk 
              ram2                            1:2    0    64M  0 disk 
              ram3                            1:3    0    64M  0 disk 
              ram4                            1:4    0    64M  0 disk 
              ram5                            1:5    0    64M  0 disk 
              ram6                            1:6    0    64M  0 disk 
              ram7                            1:7    0    64M  0 disk 
              ram8                            1:8    0    64M  0 disk 
              ram9                            1:9    0    64M  0 disk 
              loop0                           7:0    0         0 loop 
              loop1                           7:1    0         0 loop 
              loop2                           7:2    0         0 loop 
              loop3                           7:3    0         0 loop 
              loop4                           7:4    0         0 loop 
              loop5                           7:5    0         0 loop 
              loop6                           7:6    0         0 loop 
              loop7                           7:7    0         0 loop 
              ram10                           1:10   0    64M  0 disk 
              ram11                           1:11   0    64M  0 disk 
              ram12                           1:12   0    64M  0 disk 
              ram13                           1:13   0    64M  0 disk 
              ram14                           1:14   0    64M  0 disk 
              ram15                           1:15   0    64M  0 disk
              Code:
              sudo pvs --all
              Code:
               PV                     VG         Fmt  Attr PSize   PFree 
                /dev/kubuntu-vg/root                   ---       0      0 
                /dev/kubuntu-vg/swap_1                 ---       0      0 
                /dev/ram0                              ---       0      0 
                /dev/ram1                              ---       0      0 
                /dev/ram10                             ---       0      0 
                /dev/ram11                             ---       0      0 
                /dev/ram12                             ---       0      0 
                /dev/ram13                             ---       0      0 
                /dev/ram14                             ---       0      0 
                /dev/ram15                             ---       0      0 
                /dev/ram2                              ---       0      0 
                /dev/ram3                              ---       0      0 
                /dev/ram4                              ---       0      0 
                /dev/ram5                              ---       0      0 
                /dev/ram6                              ---       0      0 
                /dev/ram7                              ---       0      0 
                /dev/ram8                              ---       0      0 
                /dev/ram9                              ---       0      0 
                /dev/sda1                              ---       0      0 
                /dev/sda5              kubuntu-vg lvm2 a--  297.85g 16.00m
                /dev/sdb1                              ---       0      0 
                /dev/sdc1                              ---       0      0 
                /dev/sdd1                              ---       0      0 
                /dev/sdd5                              ---       0      0

              Comment


                #22
                Originally posted by phonic-otg View Post
                In regards to recollection of 320gb partioning I really thought there was an fdisk readout in post#5
                fdisk outputs are less useful because they don't show (possible) mount points or device chaining. You can see that the output of lsblk is more useful for understanding how a device is partitioned.

                Originally posted by phonic-otg View Post
                I seem to recall MediaNova partition being being sda1 and 230gb, with Nova11 being sda2 and with linux 12.04 around 60gb, sda 5 was swap HERE has some fairly recent information from my system though I don't know how valuable in relation to partitioning it will reveal.
                In that post, you supplied the following information:
                Code:
                phonic@Nova-Fractal:~$ df -h --exclude-type=tmpfs --exclude-type=devtmpfs
                Filesystem      Size  Used Avail Use% Mounted on
                /dev/sda2        60G   52G  4.7G  92% /
                /dev/sda1       223G  210G  2.2G  99% /media/Media-Nova
                /dev/sdc1        15G   15G  345M  98% /media/JAY IPOD
                /dev/sdb1       1.9T  1.8T   47G  98% /media/SOL
                Unfortunately, dh doesn't tell us anything about swap partitions. It's also difficult to understand why that partition would be /dev/sda5 rather than /dev/sda3. Before this mishap, can you recall whether you had created an extended partition on /dev/sda, perhaps?

                Do you have any clue what sequence of steps caused you to accidentally create this new partition table on /dev/sda, including somehow obtaining an LVM setup?

                Working through this will take a series of steps, and I will be asking you several questions throughout. I may have you perform a number of diagnostic and discovery requests. Please bear with me.

                Comment


                  #23
                  sda originally was loaded with winxp/win7 that made up sda1 renamed media-nova sda2 originally had 10.04 then upgraded to 12.04. As for why swap is sda5 I really am unsure. It was a while ago now since I'd last partitioned that drive.

                  As to the sequence of events that led to the new partition table with lvm this
                  decided to try installing on a thumb drive (16gb). With the 13.04 live usb (7.5gb) I had booted to. I chose to "install" rather than "try", and bam the gui shrunk to tiny font, I clicked ok twice in that mode but decided to stop and quit, Gui returned to normal, then went into "try" loaded the 13.04 and installed to 16gb.
                  is where it went pearshaped, twice was thrice acctually.

                  Working through this will take a series of steps, and I will be asking you several questions throughout. I may have you perform a number of diagnostic and discovery requests. Please bear with me.
                  I am aware it's 10:30pm-ish your local time (3:30pm-ish here) and am super cool with picking this up tomorrow or if you wish to continue I am more than happy to.

                  Comment


                    #24
                    Alright, here we go. Summary of this sequence: we will remove the existing malformed partition table and create a new one. We will create a single partition that spans the entire disk. We will examine the superblock to find out how many blocks the first file system should have.

                    Make sure you're running as root. In the steps below, type the bold red items. I'm following along on a spare drive of my own and copy-pasting the entire outputs.


                    1. remove the existing malformed partition table and create a new one
                    Code:
                    # [B][COLOR="#B22222"]fdisk /dev/sda[/COLOR][/B]
                    
                    Command (m for help): [B][COLOR="#B22222"]o[/COLOR][/B]
                    Building a new DOS disklabel with disk identifier 0x[I]yyyyyyyy[/I].
                    Changes will remain in memory only, until you decide to write them.
                    After that, of course, the previous content won't be recoverable.
                    
                    Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)
                    
                    Command (m for help): [B][COLOR="#B22222"]w[/COLOR][/B]
                    The partition table has been altered!
                    
                    Calling ioctl() to re-read partition table.
                    Syncing disks.

                    2. create a single partition that spans the entire disk
                    Code:
                    # [B][COLOR="#B22222"]fdisk /dev/sda[/COLOR][/B]
                    
                    Command (m for help): [B][COLOR="#B22222"]n[/COLOR][/B]
                    Partition type:
                       p   primary (0 primary, 0 extended, 4 free)
                       e   extended
                    Select (default p): [B][COLOR="#B22222"]<enter>[/COLOR][/B]
                    Partition number (1-4, default 1): [B][COLOR="#B22222"]<enter>[/COLOR][/B]
                    First sector (2048-[I]nnnnnnnnn[/I], default 2048): [B][COLOR="#B22222"]<enter>[/COLOR][/B]
                    Using default value 2048
                    Last sector, +sectors or +size{K,M,G} (2048-[I]nnnnnnnnn[/I], default [I]nnnnnnnnn[/I]): [b][COLOR="#B22222"]<enter>[/COLOR][/b]
                    Using default value [I]nnnnnnnnn[/I]
                    
                    Command (m for help): [B][COLOR="#B22222"]w[/COLOR][/B]
                    The partition table has been altered!
                    
                    Calling ioctl() to re-read partition table.
                    Syncing disks.

                    3. examine the superblock to find out how many blocks the first file system should have
                    Code:
                    # [B][COLOR="#B22222"]dumpe2fs /dev/sda1 | grep "Block count:"[/COLOR][/B]
                    dumpe2fs 1.42.5 (29-Jul-2012)
                    Block count:              [I]mmmmmmm[/I]

                    What is your value of mmmmmmm in step 3?
                    Last edited by SteveRiley; Aug 06, 2013, 12:09 PM.

                    Comment


                      #25
                      OK I'll mirror.

                      1. remove the existing malformed partition table and create a new one
                      Code:
                      root@Gamer:~# fdisk /dev/sda
                      
                      Command (m for help): o
                      Building a new DOS disklabel with disk identifier 0x39f93e93.
                      Changes will remain in memory only, until you decide to write them.
                      After that, of course, the previous content won't be recoverable.
                      
                      Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)
                      
                      Command (m for help): w
                      The partition table has been altered!
                      
                      Calling ioctl() to re-read partition table.
                      Syncing disks.
                      (this is the output after rebooting as during the first attempt to post I forgot to save/post (although the auto save may have?) the output I'd started posting here before rebooting as the output suggested. There was error 16 something about the kernel using the old partition table and cant load the new one, until a reboot or use "some-programm"(8) or "another-programm" )
                      From now on I'll have to save and just edit/add new info until I get to step 3.

                      2. create a single partition that spans the entire disk
                      Code:
                      root@Gamer:~# fdisk /dev/sda
                      
                      Command (m for help): n
                      Partition type:
                         p   primary (0 primary, 0 extended, 4 free)
                         e   extended
                      Select (default p): 
                      Using default response p
                      Partition number (1-4, default 1): 
                      Using default value 1
                      First sector (2048-625142447, default 2048): 
                      Using default value 2048
                      Last sector, +sectors or +size{K,M,G} (2048-625142447, default 625142447): 
                      Using default value 625142447
                      
                      Command (m for help): w
                      The partition table has been altered!
                      
                      Calling ioctl() to re-read partition table.
                      Syncing disks.
                      3. examine the superblock to find out how many blocks the first file system should have
                      Code:
                      root@Gamer:~# dumpe2fs /dev/sda1 | grep "Block count:"
                      dumpe2fs 1.42.5 (29-Jul-2012)
                      Block count:              248832
                      Last edited by SteveRiley; Aug 06, 2013, 12:10 PM. Reason: ADDITIONAL INFO

                      Comment


                        #26
                        Not good. Take a look at the output from your dumpe2fs. The size of the first file system on your disk is 248,832 blocks. This matches exactly the size of the first partition after your failed installation, and is nowhere near the 223 GB that your previous /dev/sda1 used to occupy. Because you have new file systems located on the drive, we can no longer discover the old file system layout and create a matching partition table.

                        I'm sorry -- I don't think there's anything more we can do. Looks like you'll have to take the drive to a forensics firm that can do a sector-by-sector file recovery.

                        Comment


                          #27
                          Thanks any way.

                          I'm curious as to why nearly every piece of software that regonfigures it's self or another programme leaves some sort of backup file. Loved would be the tech that enables this for partitions and their filestructures.
                          Last edited by phonic-otg; Aug 06, 2013, 04:24 PM.

                          Comment


                            #28
                            GPT disks do keep two copies of their partition tables; this is one of several reasons why GPT is superior to MBR.

                            A file system structure isn't something that lends itself easily to making a copy of.The only reason why the recovery attempt I was trying would work is because EXT2/3/4 have enough information in their superblocks from which to reconstruct a partition. Not all file system types have this property.

                            You know, at this point, I'd suggest you try the tool PhotoRec from CGSecurity. It attempts to rebuild files based on signatures; it ignores partition tables and filesystems. It knows how to find many types of files, it may work for you. (CGSecurity's other tool, TestDisk, isn't sophisticated enough for the problem you're having.)

                            Comment


                              #29
                              Downloaded the combined softeware will look with fresh eyes when I awake.

                              Comment


                                #30
                                Installed the combined TestDisk and PhotoRec extracted and ran in terminal
                                Code:
                                sudo ./photorec_static
                                1st screen.
                                Code:
                                PhotoRec 6.14, Data Recovery Utility, July 2013
                                Christophe GRENIER <grenier@cgsecurity.org>
                                http://www.cgsecurity.org
                                
                                  PhotoRec is free software, and
                                comes with ABSOLUTELY NO WARRANTY.
                                
                                Select a media (use Arrow keys, then press Enter):
                                >Disk /dev/sda - 320 GB / 298 GiB (RO) - Hitachi HDS721032CLA362
                                 Disk /dev/sdb - 2000 GB / 1863 GiB (RO) - ST2000DM001-1CH164
                                 Disk /dev/sdc - 16 GB / 14 GiB (RO) - SanDisk Cruzer Switch
                                2nd screen.
                                Code:
                                PhotoRec 6.14, Data Recovery Utility, July 2013
                                Christophe GRENIER <grenier@cgsecurity.org>
                                http://www.cgsecurity.org
                                
                                Disk /dev/sda - 320 GB / 298 GiB (RO) - Hitachi HDS721032CLA362
                                
                                     Partition                  Start        End    Size in sectors
                                      No partition             0   0  1 38913  80 63  625142448 [Whole disk]
                                > 1 P Linux                    0  32 33 38913  80 63  625140400
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                
                                >[ Search ]  [Options ]  [File Opt]  [  Quit  ]
                                                              Start file recovery
                                I've a bit of a learning curve here, feel free to chime in please as I don't know where to start.
                                I'm starting to read the online files to navigate it also.
                                Thanks
                                PS Will this ruin the drive if I fail?

                                Comment

                                Working...
                                X