Page 74 of 103 FirstFirst ... 2464727374757684 ... LastLast
Results 731 to 740 of 1028

Thread: How to install Grub from a live Ubuntu cd.

  1. #731
    Join Date
    Mar 2008
    Beans
    4,714
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: How to install Grub from a live Ubuntu cd.

    Edit: Sorry -- I am too slow.
    themusicdan, I'll leave what I've written, but caljohnsmith is much more knowledgable than I am, and I'd recommend listening to what he says first.

    I just noticed this:
    Code:
    root@ubuntu:/# sudo fdisk -lu
    sudo: unable to resolve host ubuntu
    omitting empty partition (5)
    I believe when you see "omitting empty partition" it is a sign that the partition table is corrupted. To fix this, boot from the LiveCD, go to System>Admin>Software Sources and make sure the Ubuntu universe repository is enabled. Then install the testdisk package.

    To run testdisk, type
    Code:
    sudo testdisk
    Then follow caljohnsmith's instructions here: http://ubuntu-virginia.ubuntuforums....07&postcount=3.

    Testdisk can repair partition tables.
    Currently, fdisk is saying that sda5 is empty. That's not good, since sda5 contained your Linux installation. Testdisk may be able to recover the old partition table, and all the files within it.

    After you do the testdisk "Quick Search" or "Deeper Search", use the up/down arrows to move among your partitions. Press 'p' to try to list files inside the sda5 partition. See if you can find a partition with your Linux files inside.
    Last edited by unutbu; February 15th, 2009 at 07:59 PM.

  2. #732
    Join Date
    Mar 2008
    Location
    California, USA
    Beans
    8,111

    Re: How to install Grub from a live Ubuntu cd.

    Themusicdan, how about downloading the attached "partition_table.txt" file to your Ubuntu desktop, and then do:
    Code:
    sudo sfdisk --no-reread -f /dev/sda  < ~/Desktop/partition_table.txt
    And please post the output. Then reboot your Live CD, and please post the output of all the following commands:
    Code:
    sudo fdisk -lu
    sudo parted /dev/sda print
    sudo grub
    grub> root (hd0,4)
    grub> setup (hd0)
    grub> quit
    And we can work from there.

    EDIT: Sorry, just saw your post Unutbu. Testdisk would work, but since all we need to do is change sda3 into a logical partition, I think the above method is quicker and easier; it's up to themusicdan though.
    Attached Files Attached Files
    Last edited by caljohnsmith; February 15th, 2009 at 09:39 PM.

  3. #733
    Join Date
    Nov 2008
    Location
    New York, NY
    Beans
    18
    Distro
    Ubuntu 8.10 Intrepid Ibex

    Re: How to install Grub from a live Ubuntu cd.

    Unutbu, I didn't find testdisk in the repository, so I am going to try caljohnsmith's method. Here's the output:

    ubuntu@ubuntu:~$ sudo sfdisk --no-reread -f /dev/sda < ~/Desktop/partition_table.txt

    Disk /dev/sda: 91201 cylinders, 255 heads, 63 sectors/track
    Old situation:
    Units = cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0

    Device Boot Start End #cyls #blocks Id System
    /dev/sda1 * 0+ 2549 2550- 20482843+ 7 HPFS/NTFS
    /dev/sda2 6374 91199 84826 681364845 f W95 Ext'd (LBA)
    start: (c,h,s) expected (1023,254,63) found (1023,0,1)
    /dev/sda3 12748+ 38243 25496- 204796588+ 7 HPFS/NTFS
    start: (c,h,s) expected (1023,254,63) found (1023,1,1)
    /dev/sda4 0 - 0 0 0 Empty
    /dev/sda5 6374+ 10315 3942- 31664052 83 Linux
    start: (c,h,s) expected (1023,254,63) found (1023,2,1)
    /dev/sda6 10316+ 12747 2432- 19535008+ 82 Linux swap / Solaris
    start: (c,h,s) expected (1023,254,63) found (1023,1,1)
    /dev/sda7 38244+ 91199 52956- 425369038+ 7 HPFS/NTFS
    start: (c,h,s) expected (1023,254,63) found (1023,1,1)

    sfdisk: long or incomplete input line - quitting
    ubuntu@ubuntu:~$

  4. #734
    Join Date
    Mar 2008
    Location
    California, USA
    Beans
    8,111

    Re: How to install Grub from a live Ubuntu cd.

    I think I didn't get the spacing exactly right in that last partition_table.txt file that I uploaded, themusicdan; sfdisk is unfortunately very finicky about things like that. I uploaded a new partition_table.txt file to my previous post that I think should work. Please use that and post the output; we can work from there.

  5. #735
    Join Date
    Nov 2008
    Location
    New York, NY
    Beans
    18
    Distro
    Ubuntu 8.10 Intrepid Ibex

    Re: How to install Grub from a live Ubuntu cd.

    I tried using the updated file and the output is the same.

    ubuntu@ubuntu:~$ sudo sfdisk --no-reread -f /dev/sda < ~/Desktop/partition_table2.txt

    Disk /dev/sda: 91201 cylinders, 255 heads, 63 sectors/track
    Old situation:
    Units = cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0

    Device Boot Start End #cyls #blocks Id System
    /dev/sda1 * 0+ 2549 2550- 20482843+ 7 HPFS/NTFS
    /dev/sda2 6374 91199 84826 681364845 f W95 Ext'd (LBA)
    start: (c,h,s) expected (1023,254,63) found (1023,0,1)
    /dev/sda3 12748+ 38243 25496- 204796588+ 7 HPFS/NTFS
    start: (c,h,s) expected (1023,254,63) found (1023,1,1)
    /dev/sda4 0 - 0 0 0 Empty
    /dev/sda5 6374+ 10315 3942- 31664052 83 Linux
    start: (c,h,s) expected (1023,254,63) found (1023,2,1)
    /dev/sda6 10316+ 12747 2432- 19535008+ 82 Linux swap / Solaris
    start: (c,h,s) expected (1023,254,63) found (1023,1,1)
    /dev/sda7 38244+ 91199 52956- 425369038+ 7 HPFS/NTFS
    start: (c,h,s) expected (1023,254,63) found (1023,1,1)

    sfdisk: long or incomplete input line - quitting
    ubuntu@ubuntu:~$

  6. #736
    Join Date
    Mar 2008
    Location
    California, USA
    Beans
    8,111

    Re: How to install Grub from a live Ubuntu cd.

    Themusicdan, would you please repost the output of the "sudo -d /dev/sda" command, but this time do not put it in quotes? If you don't use the "quick reply" box, but instead hit the "reply" button in the lower left corner of the thread, in that message box there should be a pound/hash sign "#" graphic near the quote button to put "code" tags around the result (it's right next to the quote button graphic). Please try that, because I think I must be getting the spacing messed up with the partition_table.txt file.

  7. #737
    Join Date
    Nov 2008
    Location
    New York, NY
    Beans
    18
    Distro
    Ubuntu 8.10 Intrepid Ibex

    Re: How to install Grub from a live Ubuntu cd.

    Sorry about that. Here is the output. Thanks for the tip.

    Code:
    ubuntu@ubuntu:~$ sudo sfdisk -d /dev/sda
    # partition table of /dev/sda
    unit: sectors
    
    /dev/sda1 : start=       63, size= 40965687, Id= 7, bootable
    /dev/sda2 : start=102398310, size=1362729690, Id= f
    /dev/sda3 : start=204796683, size=409593177, Id= 7
    /dev/sda4 : start=        0, size=        0, Id= 0
    /dev/sda5 : start=102398436, size= 63328104, Id=83
    /dev/sda6 : start=165726603, size= 39070017, Id=82
    /dev/sda7 : start=614389923, size=850738077, Id= 7
    ubuntu@ubuntu:~$

  8. #738
    Join Date
    Nov 2008
    Location
    New York, NY
    Beans
    18
    Distro
    Ubuntu 8.10 Intrepid Ibex

    Re: How to install Grub from a live Ubuntu cd.

    I edited the partition_table.txt, and tried again using the output I just posted. I attached the partition_table3.txt that I made, and here is the new output:

    Code:
    ubuntu@ubuntu:~$ sudo sfdisk --no-reread -f /dev/sda < ~/Desktop/partition_table3.txt
    
    Disk /dev/sda: 91201 cylinders, 255 heads, 63 sectors/track
    Old situation:
    Units = cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0
    
       Device Boot Start     End   #cyls    #blocks   Id  System
    /dev/sda1   *      0+   2549    2550-  20482843+   7  HPFS/NTFS
    /dev/sda2       6374   91199   84826  681364845    f  W95 Ext'd (LBA)
    		start: (c,h,s) expected (1023,254,63) found (1023,0,1)
    /dev/sda3      12748+  38243   25496- 204796588+   7  HPFS/NTFS
    		start: (c,h,s) expected (1023,254,63) found (1023,1,1)
    /dev/sda4          0       -       0          0    0  Empty
    /dev/sda5       6374+  10315    3942-  31664052   83  Linux
    		start: (c,h,s) expected (1023,254,63) found (1023,2,1)
    /dev/sda6      10316+  12747    2432-  19535008+  82  Linux swap / Solaris
    		start: (c,h,s) expected (1023,254,63) found (1023,1,1)
    /dev/sda7      38244+  91199   52956- 425369038+   7  HPFS/NTFS
    		start: (c,h,s) expected (1023,254,63) found (1023,1,1)
    Warning: given size (850738077) exceeds max allowable size (0)
    cannot build surrounding extended partition
    
    sfdisk: bad input
    Attached Files Attached Files

  9. #739
    Join Date
    Mar 2008
    Location
    California, USA
    Beans
    8,111

    Re: How to install Grub from a live Ubuntu cd.

    OK, I think I got it this time, so please download the attached partition_table.txt and give it a try.
    Attached Files Attached Files

  10. #740
    Join Date
    Nov 2008
    Location
    New York, NY
    Beans
    18
    Distro
    Ubuntu 8.10 Intrepid Ibex

    Re: How to install Grub from a live Ubuntu cd.

    Well, it gave me an error again. Here it is:

    Code:
    ubuntu@ubuntu:~$ sudo sfdisk --no-reread -f /dev/sda < ~/Desktop/partition_table4.txt
    
    Disk /dev/sda: 91201 cylinders, 255 heads, 63 sectors/track
    Old situation:
    Units = cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0
    
       Device Boot Start     End   #cyls    #blocks   Id  System
    /dev/sda1   *      0+   2549    2550-  20482843+   7  HPFS/NTFS
    /dev/sda2       6374   91199   84826  681364845    f  W95 Ext'd (LBA)
    		start: (c,h,s) expected (1023,254,63) found (1023,0,1)
    /dev/sda3      12748+  38243   25496- 204796588+   7  HPFS/NTFS
    		start: (c,h,s) expected (1023,254,63) found (1023,1,1)
    /dev/sda4          0       -       0          0    0  Empty
    /dev/sda5       6374+  10315    3942-  31664052   83  Linux
    		start: (c,h,s) expected (1023,254,63) found (1023,2,1)
    /dev/sda6      10316+  12747    2432-  19535008+  82  Linux swap / Solaris
    		start: (c,h,s) expected (1023,254,63) found (1023,1,1)
    /dev/sda7      38244+  91199   52956- 425369038+   7  HPFS/NTFS
    		start: (c,h,s) expected (1023,254,63) found (1023,1,1)
    
    sfdisk: long or incomplete input line - quitting
    ubuntu@ubuntu:~$

Page 74 of 103 FirstFirst ... 2464727374757684 ... LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •