greebothecat
January 29th, 2010, 12:27 PM
Hey, I have a major problem here..
I have messed up my partitions really bad and grub refuses to install.
Here's how it looks:
Device Boot Start End Blocks Id System
/dev/sda1 * 1 13 104391 83 Linux
/dev/sda2 14 2432 19430617+ 83 Linux
/dev/sda3 2433 60801 468848992+ 5 Extended
/dev/sda5 2433 2930 4000153+ 82 Linux swap / Solaris
/dev/sda6 2931 53535 406484631 83 Linux
/dev/sda7 53536 60801 58364113+ 7 HPFS/NTFS
Initially there was only Linux (Karmic) on this hdd, on what is now sda2 to sda6, current sda2 being the boot partition. Now, I decided to install Windows XP and using GParted I created an NTFS partition at the end, sda7. But it wanted to have his loader on the first one, so (now this is probably stupid what I did) I cut 100MB from Linux root and put it as NTFS at the beginning, making it sda1, boot and letting windows install it's loader there. I figured I can just reintall grub on it later (think I have misred some tutorials). As you can probably guess, it won't.
I formatted sda1 to ext4 now (should it be something else?). What I do is run the Live CD (9.10), use terminal, then do
sudo -i
mkdir /media/boot
mount /dev/sda1 /media/boot
grub-install --recheck --root-directory=/media/boot /dev/sda1
and it goes
grub-setup: warn: Attempting to install GRUB to a partition instead of the MBR. This is a BAD idea.
grub-setup: warn: Embedding is not possible. GRUB can only be installed in this setup by using blocklists. However, blocklists are UNRELIABLE and its use is discouraged.
grub-setup: error: Cannot read `/grub/core.img' correctly
also, when I do update-grub it says "grub-probe: error: cannot find a device for /."
tried installing grub on sda2 and flagging it as a boot and still no-go :/
I'm all out of ideas, could anybody please help me or point to the right tutorial?
I have messed up my partitions really bad and grub refuses to install.
Here's how it looks:
Device Boot Start End Blocks Id System
/dev/sda1 * 1 13 104391 83 Linux
/dev/sda2 14 2432 19430617+ 83 Linux
/dev/sda3 2433 60801 468848992+ 5 Extended
/dev/sda5 2433 2930 4000153+ 82 Linux swap / Solaris
/dev/sda6 2931 53535 406484631 83 Linux
/dev/sda7 53536 60801 58364113+ 7 HPFS/NTFS
Initially there was only Linux (Karmic) on this hdd, on what is now sda2 to sda6, current sda2 being the boot partition. Now, I decided to install Windows XP and using GParted I created an NTFS partition at the end, sda7. But it wanted to have his loader on the first one, so (now this is probably stupid what I did) I cut 100MB from Linux root and put it as NTFS at the beginning, making it sda1, boot and letting windows install it's loader there. I figured I can just reintall grub on it later (think I have misred some tutorials). As you can probably guess, it won't.
I formatted sda1 to ext4 now (should it be something else?). What I do is run the Live CD (9.10), use terminal, then do
sudo -i
mkdir /media/boot
mount /dev/sda1 /media/boot
grub-install --recheck --root-directory=/media/boot /dev/sda1
and it goes
grub-setup: warn: Attempting to install GRUB to a partition instead of the MBR. This is a BAD idea.
grub-setup: warn: Embedding is not possible. GRUB can only be installed in this setup by using blocklists. However, blocklists are UNRELIABLE and its use is discouraged.
grub-setup: error: Cannot read `/grub/core.img' correctly
also, when I do update-grub it says "grub-probe: error: cannot find a device for /."
tried installing grub on sda2 and flagging it as a boot and still no-go :/
I'm all out of ideas, could anybody please help me or point to the right tutorial?