Grub and External Hard Disk

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post please read how to get help

Grub and External Hard Disk

Postby gismondo on Sun Feb 24, 2008 8:15 am

Hi !
I have a doubt, I hope you can help me...
I have an external Hard Disk partitioned like this:
59 GB ext3 / (Linux Mint)
1 GB swap
100 GB ntfs (Files...)

I Installed Grub on this Hard Disk and I think the installer has intalled it in the MBR of this Disk (with Mepis I could choose to install on MBR or on the Partition)

Now my question is: if I delete the Swap and Ext3 partition and give all the space to the NTFS parition, what will happen to Grub??? I think it would remain in the MBR but then It would be useless because I have nothing to load.....

Can you help me? Thanks

P.S.:sorry for my bad english :)
gismondo
Level 1
Level 1
 
Posts: 12
Joined: Wed Nov 21, 2007 11:09 am

Linux Mint is funded by ads and donations.
 

Re: Grub and External Hard Disk

Postby Husse on Sun Feb 24, 2008 10:52 am

Don't be sorry - your english is good
This is a bit tricky - as you suspect grub (stage 1) will remain in MBR
And boot loaders don't have an uninstall command (why should they?)
I haven't checked what "Supergrub" can do (5 MB download) google for it
Otherwise fixmbr from windows - but do think twice at least so you get it done on the right disk
Or wipe the disk entirely (google for that)
Image
Don't fix it if it ain't broken, don't break it if you can't fix it
Husse
Level 21
Level 21
 
Posts: 19703
Joined: Sun Feb 11, 2007 7:22 am
Location: Near Borås Sweden

Re: Grub and External Hard Disk

Postby gismondo on Sun Feb 24, 2008 3:22 pm

Hi !
Thanks for the reply....
This is the problem, with fixmbr you can fix a windows Installation but, in my case, windows is not installed on the external hard disk...
all I want to do is remove Grub from MBR and I think this should be Ok:

# install -mbr /dev/sdb

I think this should give me a new MBR....what do you think???

Or maybe I'd better do this:

# dd if=/dev/zero of=/dev/hda bs=446 count=1

This should zero the MBR but not the partition Table (because the other 64 bytes aren't erased)
I think the second is correct but I'm not sure...what do you think???

EDIT: I googled for the first command and it seems is not correct while here they say the second should be OK:
http://www.linuxquestions.org/questions ... y.-606489/
Can someone confirm this?

P.S.: my intention is not to criticize, but why don't we have the option of installing Grub on a specified partition in the Mint Installer (instead of installing it in the MBR)?
gismondo
Level 1
Level 1
 
Posts: 12
Joined: Wed Nov 21, 2007 11:09 am

Re: Grub and External Hard Disk

Postby Fred on Sun Feb 24, 2008 3:46 pm

gismondo,

My question would be: Why do you wish to erase the mbr on that hard drive? If you ever want to use that mbr again, whatever you put on it will over write the existing mbr anyway.

But, to answer your question. To erase the mbr type:

Code: Select all
sudo dd if=/dev/zero of=/dev/sdx bs=446 count=1


Adjust /dev/sdx to what applies to you.

If you wish to erase the mbr and the partition tables so you have all unallocated space on the drive type:

Code: Select all
sudo dd if=/dev/zero of=/dev/sdx bs=512 count=1


Again, adjust /dev/sdx to what applies to you.

Be very careful to get the right hard disk. Once you have done this you can't undo it. :-)

Hope this helps,

Fred
Insanity: Doing the same thing over and over and each time expecting a different result.

Democracy is 2 wolves and a lamb voting on the menu. Liberty is an armed lamb protesting the electoral outcome. A Republic negates the need for an armed protest.
User avatar
Fred
Level 10
Level 10
 
Posts: 3356
Joined: Fri Jan 04, 2008 11:59 am
Location: NC USA

Re: Grub and External Hard Disk

Postby gismondo on Sun Feb 24, 2008 3:58 pm

Hi Fred !
Thanks for the reply....
as I've already said, if I want to delete all the Linux-related partition and leave all the HDD to the NTFS partition, what will be then the need of having grub installed??
All I'd like to have is no bootloader so that's why I need to erase the MBR....
Anyway after erasing the MBR with dd, I could always reinstall Grub in future right??
gismondo
Level 1
Level 1
 
Posts: 12
Joined: Wed Nov 21, 2007 11:09 am

Re: Grub and External Hard Disk

Postby Fred on Sun Feb 24, 2008 4:24 pm

Well, you don't need to erase grub from the mbr, but it won't hurt if you do. If you erase the mbr you can always put grub back, that's true. I just want you to understand that you gain nothing by erasing it. It will have no effect on your using the entire drive as an extra Windows ntfs drive.

To use the entire drive as ntfs you will have to use something like Gparted to destroy the Linux partitions and create another partition from the unallocated space and formate it ntfs.

If you already have an ntfs partition on that drive you could also just expand it to take all the newly freed space.

I hope I have not confused you and this is helpful. I am sorry but I only speak English. And not so good at that. :-)

Fred
Insanity: Doing the same thing over and over and each time expecting a different result.

Democracy is 2 wolves and a lamb voting on the menu. Liberty is an armed lamb protesting the electoral outcome. A Republic negates the need for an armed protest.
User avatar
Fred
Level 10
Level 10
 
Posts: 3356
Joined: Fri Jan 04, 2008 11:59 am
Location: NC USA

Re: Grub and External Hard Disk

Postby gismondo on Sun Feb 24, 2008 4:37 pm

Ok, thanks a lot Fred!

EDIT: sorry, I have a last question...
let's suppose I have an Hard disk (/dev/sdb) of 100 Gb partitioned like this:
1 Gb Swap
59 GB ext3 / Linux Mint
40 GB ext3
Grub is installed in the MBR, in grub language (hd1,0)
Let's say I want to install another distro in the 40Gb partition and I choose to reinstall Grub....
Obviously it will overwrite the grub which is installed now, but then what will happen to the /boot/grub folder which I have now on the 59Gb partition??
I know it's a bit complicated but I really need to know what will happen in case like this...
I hope you can help me
gismondo
Level 1
Level 1
 
Posts: 12
Joined: Wed Nov 21, 2007 11:09 am

Linux Mint is funded by ads and donations.
 

Return to Installation & Boot

Who is online

Users browsing this forum: gold_finger and 21 guests