Originally posted by Snowhog
View Post
Announcement
Collapse
No announcement yet.
Grub Help.
Collapse
This topic is closed.
X
X
-
Pan-Galactic QuordlepleenSo Long, and Thanks for All the Fish
- Jul 2011
- 9524
- Seattle, WA, USA
- Send PM
-
Thank you for responding. As Snowhog suggested I've done nothing other than theCode:sudo fdisk -l
Code:cat /proc/version
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
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.
- Top
- Bottom
Comment
-
Pan-Galactic QuordlepleenSo Long, and Thanks for All the Fish
- Jul 2011
- 9524
- Seattle, WA, USA
- Send PM
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
- Top
- Bottom
Comment
-
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 lateryour post #5, tell me that while your machine is UEFI capable, none of your operating systems have been installed in UEFI mode.
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
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.
- Top
- Bottom
Comment
-
Pan-Galactic QuordlepleenSo Long, and Thanks for All the Fish
- Jul 2011
- 9524
- Seattle, WA, USA
- Send PM
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
Last edited by SteveRiley; Aug 05, 2013, 09:47 PM.
- Top
- Bottom
Comment
-
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
- Top
- Bottom
Comment
-
Pan-Galactic QuordlepleenSo Long, and Thanks for All the Fish
- Jul 2011
- 9524
- Seattle, WA, USA
- Send PM
Originally posted by phonic-otg View PostIn regards to recollection of 320gb partioning I really thought there was an fdisk readout in post#5
Originally posted by phonic-otg View PostI 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: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
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.
- Top
- Bottom
Comment
-
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 thisdecided 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.
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.
- Top
- Bottom
Comment
-
Pan-Galactic QuordlepleenSo Long, and Thanks for All the Fish
- Jul 2011
- 9524
- Seattle, WA, USA
- Send PM
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.
- Top
- Bottom
Comment
-
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.
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.
Code:root@Gamer:~# dumpe2fs /dev/sda1 | grep "Block count:" dumpe2fs 1.42.5 (29-Jul-2012) Block count: 248832
- Top
- Bottom
Comment
-
Pan-Galactic QuordlepleenSo Long, and Thanks for All the Fish
- Jul 2011
- 9524
- Seattle, WA, USA
- Send PM
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.
- Top
- Bottom
Comment
-
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.
- Top
- Bottom
Comment
-
Pan-Galactic QuordlepleenSo Long, and Thanks for All the Fish
- Jul 2011
- 9524
- Seattle, WA, USA
- Send PM
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.)
- Top
- Bottom
Comment
-
Installed the combined TestDisk and PhotoRec extracted and ran in terminalCode:sudo ./photorec_static
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
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'm starting to read the online files to navigate it also.
Thanks
PS Will this ruin the drive if I fail?
- Top
- Bottom
Comment
Comment