Jump to content

Welcome to Geeks to Go - Register now for FREE

Geeks To Go is a helpful hub, where thousands of volunteer geeks quickly serve friendly answers and support. Check out the forums and get free advice from the experts. Register now to gain access to all of our features, it's FREE and only takes one minute. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more.

Create Account How it Works
Photo

Can't access Linux


  • Please log in to reply

#1
The Admiral

The Admiral

    Trusted Tech

  • Technician
  • 1,067 posts
Okay, long story short, I installed GRUB to the bootsector, but then overwrote the bootsector during the install of another OS. Is there a way I can boot into Linux and install GRUB to the Linux partition, or install GRUB to the partition without booting into it? My bootloader wants GRUB to be on the Linux partition, not the bootsector. Here's my partition table, MBR formatted:

Partition 1: NTFS (Vista)
Partition 2: NTFS (XP)
Partition 3: HFS+ (OSX)
Partition 4: Extended Partition
Partition 5: ext3 (maybe 2) (Ubuntu 8.06)
Partition 6: linux-swap (SWAP)
  • 0

Advertisements


#2
Tyger

Tyger

    Member 2k

  • Member
  • PipPipPipPipPip
  • 2,896 posts
Whenever you want to add another operating system to a disk it's a good idea to save your boot sector to a file so that you can restore it if need be. It's very simple to do using the dd command:

dd if=/dev/sda bs=512 count=1 of=/boot/bootsector.img

done in root mode will save the file to the boot directory. Then you can use a live CD to restore the boot sector at will.

That being said, what you do in your particular case depends on what operating system replaced the boot sector. You could just use your live CD to redo the BS with grub, or you could use a Linux based repair disk to install grub. You will likely have to do some rewriting of the various configuration files. It it's Windows XP that replaced grub you could download grub4dos, which also has fat32 and ntfs versions of grub, and use the Windows boot sector in conjunction with grldr to boot the various operating systems. You would also need to do some configuration.
  • 0

#3
The Admiral

The Admiral

    Trusted Tech

  • Topic Starter
  • Technician
  • 1,067 posts
Well it isn't necessarily the bootsector that's the problem - the bootsector is how I want it. Right now, the bootloader is Darwin, which is OSX's. I like it mucho.

So I could just use the Ubuntu LiveCD to install Ubuntu again, this time with GRUB to the partition itself? Would that be easier than trying to install GRUB directly off the disk?
  • 0

#4
Tyger

Tyger

    Member 2k

  • Member
  • PipPipPipPipPip
  • 2,896 posts
If you're going to be multibooting you might want to study a bit on how grub and bootloaders in general work. If you don't have any boot directory on your Ubuntu partition you would need to install grub to it. If you do have a boot directory you can probably make it boot without doing a reinstallation.

Grub itself has three parts, the part that installs on the boot sector, the 1.5 parts which access the file system on the bootable partition and the part2 which is the actual boot loader. You can probably just use the live CD to install grub to the Ubuntu partition without resinstalling but I don't use Ubuntu so I can give you any advice about that. Then you would have to use Darwin to chainload, there again I can't help you.
  • 0

#5
The Admiral

The Admiral

    Trusted Tech

  • Topic Starter
  • Technician
  • 1,067 posts
Okay, I'll check for a /boot when I get home. No chainbooting in this situation, Darwin is basically a bootloader of bootloaders, so selecting Vista from the Darwin prompt will load the BCD and show me a boot menu for Vista. Selecting XP will load boot.ini and show me a boot screen. Normal behavior for selecting Ubuntu would be to show GRUB, indicating that the bootloader is installed on the partition, not in the bootsector, because that's where Darwin is.

Also, if the GRUB is there and just not showing up in Darwin, which partition would I have to set to bootable to boot to Ubuntu; the extended partition or Ubuntu's logical partition?

Edited by The Admiral, 20 August 2008 - 10:47 AM.

  • 0

#6
silverbeard

silverbeard

    Trusted Tech

  • Member
  • PipPipPip
  • 791 posts
The GRUB Page might be helpful.

The GRUB Manual has a lot to offer also.

GRUB can be installed on the /root partition you just need a way to point Darwin(?) to it. Or load GRUB to another boot media and use that to load Ubuntu.
  • 0

#7
The Admiral

The Admiral

    Trusted Tech

  • Topic Starter
  • Technician
  • 1,067 posts
Meh. I gave up, and decided to just reinstall Linux. But I have Fedora 9 on my USB flash drive, so I thought I'd just install F9 over Ubuntu. Worked great, and now I'm posting from F9! :)
  • 0






Similar Topics

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

As Featured On:

Microsoft Yahoo BBC MSN PC Magazine Washington Post HP