Author Topic: remove bootloader  (Read 1300 times)

Offline Yankee

  • Hero Member
  • *****
  • Posts: 1475
  • In theory, theory=practice, in practice ???
remove bootloader
« on: July 29, 2010, 11:17:33 AM »
Hello,

Is there any way to remove the Grub bootloader from an external hard drive ?

I deleted the LINUX install from it's partition.  I think it needs to be closer to the
beginning of the disk.  Now my WindowsPE recovery program will not boot from
the primary partition on the external hard drive.  LiLi however boots the LiveCD OK.
I'm going to install KDE 2010 to a flash drive and need to remove Grub and Lili from the
external hard drive so it will boot some Windows OS.  If I delete all the partitions and start
over will Grub and Lili disappear ?   Easier way of doing this possible ?


Thanks for your responses.


patrick013




 

ASUS EeePc 900HA netbook  1.6 Ghz Atom CPU  1GB RAM
160 GB internal HD    Seagate 250 GB USB portable drive 
Intel ‎Mobile 945GSE Integrated Graphics Controller
Atheros AR242x/AR542x Wireless Network Adapter
Intel (N10/ICH7 Family) High Definition Audio
Dynex 5-Button Wired Optical Mouse
LXDE

Offline everge48

  • Sr. Member
  • ****
  • Posts: 383
Re: remove bootloader
« Reply #1 on: July 29, 2010, 11:28:09 AM »
If I delete all the partitions and start
over will Grub and Lili disappear ?
Thanks for your responses.
patrick013

If by delete all the partitions you mean format the drive then the answer is yes.
« Last Edit: July 29, 2010, 12:31:37 PM by 4evergr8ful »
Any sufficiently advanced technology is indistinguishable from magic.

Offline Yankee

  • Hero Member
  • *****
  • Posts: 1475
  • In theory, theory=practice, in practice ???
Re: remove bootloader
« Reply #2 on: July 29, 2010, 11:53:00 AM »
If I delete all the partitions and start
over will Grub and Lili disappear ?
Thanks for your responses.
patrick013

If by delete the partitions you mean format the drive then the answer is yes.


Thanks for the response.

I reformatted the old LINUX partition but my WindowsPE program began to
not boot after the Grub was on this external hard drive.   

Do all the partitions need to be reformatted ? 

I was thinking Grub was an executable in the MBR somewhere and deleting all the
partitions would be the only way to remove it.  I wonder why my WindowsPE will
not boot if the Grub is gone by reformatting the LINUX partition. 


patrick




ASUS EeePc 900HA netbook  1.6 Ghz Atom CPU  1GB RAM
160 GB internal HD    Seagate 250 GB USB portable drive 
Intel ‎Mobile 945GSE Integrated Graphics Controller
Atheros AR242x/AR542x Wireless Network Adapter
Intel (N10/ICH7 Family) High Definition Audio
Dynex 5-Button Wired Optical Mouse
LXDE

Offline everge48

  • Sr. Member
  • ****
  • Posts: 383
Re: remove bootloader
« Reply #3 on: July 29, 2010, 12:14:45 PM »
If you don't have it install gparted through Synaptic.

Open GParted. Choose the drive from the drop down list (top right).
Make absolutely sure you choose the correct drive.
From the Menu Bar click 'Device' -> 'Create Partition Table'
A WARNING dialog will pop up. Click 'Apply'
The entire drive will be unallocated after this operation.
« Last Edit: July 29, 2010, 12:38:33 PM by 4evergr8ful »
Any sufficiently advanced technology is indistinguishable from magic.

Offline Yankee

  • Hero Member
  • *****
  • Posts: 1475
  • In theory, theory=practice, in practice ???
Re: remove bootloader
« Reply #4 on: July 29, 2010, 12:22:27 PM »
If you don't have it install gparted through Synaptic.

Open GParted. Choose the drive from the drop down list (top right).
Make absolutely sure you choose the correct device.
From the Menu Bar choose 'Device' -> 'Create Partition Table'
A WARNING dialog will pop up. Click 'Apply'.



One final question.   The whole disk ?    Or just the partition where the LINUX install used
to be ?   I'll do this when I get LINUX reinstalled then.

Big help, thanks.


patrick



ASUS EeePc 900HA netbook  1.6 Ghz Atom CPU  1GB RAM
160 GB internal HD    Seagate 250 GB USB portable drive 
Intel ‎Mobile 945GSE Integrated Graphics Controller
Atheros AR242x/AR542x Wireless Network Adapter
Intel (N10/ICH7 Family) High Definition Audio
Dynex 5-Button Wired Optical Mouse
LXDE

Offline everge48

  • Sr. Member
  • ****
  • Posts: 383
Re: remove bootloader
« Reply #5 on: July 29, 2010, 12:28:20 PM »
Yes, the whole disk. This will format the whole disk. You will no longer have any partitions. You'll be starting from scratch again.

Good luck.
Any sufficiently advanced technology is indistinguishable from magic.

Offline kjpetrie

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 3981
Re: remove bootloader
« Reply #6 on: July 29, 2010, 03:05:50 PM »
First, where is your PE recovery partition? Is it on the same drive? If it is, then you won't want to delete it.

Secondly, GRUB is on the MBR, but relies on menu.lst in one of the partitions. Removing the partitions won't remove GRUB but will disable it.

Third, how did PE recovery used to boot? Was it from the disc where GRUB lives, or another one? Maybe you need to change the boot device in the BIOS.

We need a lot more info about your discs and partitions and what they contain before anyone can offer more than guesswork.

Boot from a livecd, open a terminal, su to root and run "fdisk -l" (lower case 'L') and paste the output here.
-----------
KJP
-----------------------------------------------------------
PClos64 RC1 on Intel D945GCLF2 motherboard (Atom 330), 2GB DDR2 RAM, Maxtor STM325031, HL-DT-ST DVDRAM GSA-H42N, Amilo LSL 3220T monitor. Also Acer 5810TG (with custom kernel) and Asus eeePC 2G surf

Offline Yankee

  • Hero Member
  • *****
  • Posts: 1475
  • In theory, theory=practice, in practice ???
Re: remove bootloader
« Reply #7 on: July 30, 2010, 09:51:30 AM »
First, where is your PE recovery partition? Is it on the same drive? If it is, then you won't want to delete it.

Secondly, GRUB is on the MBR, but relies on menu.lst in one of the partitions. Removing the partitions won't remove GRUB but will disable it.

Third, how did PE recovery used to boot? Was it from the disc where GRUB lives, or another one? Maybe you need to change the boot device in the BIOS.

We need a lot more info about your discs and partitions and what they contain before anyone can offer more than guesswork.

Boot from a livecd, open a terminal, su to root and run "fdisk -l" (lower case 'L') and paste the output here.




Hello,

First, Windows PE (a recovery and backup program) was on partition 1, a primary partition
marked active.  Everything is on a Seagate 250GB external drive.  This would boot flawlessly
and perform every function flawlessly.

Second, I installed PCLinux on a logical partition.  It would not boot but hung up in a GRUB
screen.  I deleted the install, I repartitioned that logical drive and reformatted it to FAT32
temporarily.  The Windows PE program would not boot then, said to remove media and press
any key, then it booted the C drive with XP on it.  Can I replace the MBR to remove GRUB, this
Windows PE program will do that ?

Third, the Windows PE program booted from the same external drive, as was PCLinux partition
with GRUB installed on and deleted from and so forth.  The GRUB is on the disk where Windows
PE is on, in the MBR according to your post, even after LINUX was deleted, everything is on the
same external hard  drive here.  XP is on the C drive and nothing else is there or interferring with it.
I press esc on bootup to choose boot device and that is working every time.
 
The install of PCLinux hung up, when deleted the WindowsPE wouldn't boot, and it sounds like
GRUB is still residing in the MBR then.  Oddly, a Lili live CD booted up from an active partition
on this external drive after the above occurred.  I hope Lili is easier to get rid of.

This is the first beginner's mistake I've made, everything else is working OK.  I'll get the fdisk -l
info shortly to you.


Thanks for the reply,

patrick013




ASUS EeePc 900HA netbook  1.6 Ghz Atom CPU  1GB RAM
160 GB internal HD    Seagate 250 GB USB portable drive 
Intel ‎Mobile 945GSE Integrated Graphics Controller
Atheros AR242x/AR542x Wireless Network Adapter
Intel (N10/ICH7 Family) High Definition Audio
Dynex 5-Button Wired Optical Mouse
LXDE

Offline kjpetrie

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 3981
Re: remove bootloader
« Reply #8 on: July 30, 2010, 10:39:41 AM »
So, what can you currently boot on that machine? Or is it only livecds at present?

Have you got a Windows disc? I believe almost any one from XP on will do, so maybe you can borrow one and use it to remake the MBR as NTLDR. If you search the microsoft website

The alternative is to try to install enough of pclos (or some other Linux) to be able to get GRUB to boot Win PE. Am I right in thinking once PE is running it can also re-install NTLDR?

As you have discovered, GRUB is not self-contained, but needs to be able to read menu.lst from a valid Linux partition, so if you delete that partition you're left with an unbootable machine.

I suppose the real question is what you want to do eventually. If you intend to install Linux again there is little point reinstalling NTLDR only to have it wiped by GRUB again. Better to get GRUB and Linux working. If you want that drive to be pure Windows it makes sense to have NTLDR on its MBR as then it will always be possible to boot Win from that disc even if you normally boot something else from another disc.
-----------
KJP
-----------------------------------------------------------
PClos64 RC1 on Intel D945GCLF2 motherboard (Atom 330), 2GB DDR2 RAM, Maxtor STM325031, HL-DT-ST DVDRAM GSA-H42N, Amilo LSL 3220T monitor. Also Acer 5810TG (with custom kernel) and Asus eeePC 2G surf

Offline Yankee

  • Hero Member
  • *****
  • Posts: 1475
  • In theory, theory=practice, in practice ???
Re: remove bootloader
« Reply #9 on: July 30, 2010, 11:07:12 AM »
So, what can you currently boot on that machine? Or is it only livecds at present?

Have you got a Windows disc? I believe almost any one from XP on will do, so maybe you can borrow one and use it to remake the MBR as NTLDR. If you search the microsoft website

The alternative is to try to install enough of pclos (or some other Linux) to be able to get GRUB to boot Win PE. Am I right in thinking once PE is running it can also re-install NTLDR?

As you have discovered, GRUB is not self-contained, but needs to be able to read menu.lst from a valid Linux partition, so if you delete that partition you're left with an unbootable machine.

I suppose the real question is what you want to do eventually. If you intend to install Linux again there is little point reinstalling NTLDR only to have it wiped by GRUB again. Better to get GRUB and Linux working. If you want that drive to be pure Windows it makes sense to have NTLDR on its MBR as then it will always be possible to boot Win from that disc even if you normally boot something else from another disc.




The LiveCD is the only thing booting at present on this external drive.
If I boot WindowsPE from a different drive, a flash drive, it is able to
replace or fix the MBR, as well as fix individual partition boot sectors,
on any drive, and even has a hex editor.  I've fixed a couple that were
bad but otherwise would remain undetected.  Whether it will delete a proper
looking GRUB sitting in the MBR I do not know yet.

My XP cd is an image and will install to the c drive only.

I don't think LINUX's GRUB likes external drives or I missed an install option.
It hung up LINUX and wouldn't boot Windows you know.  Somewhere there's
an option in install for GRUB to use an external drive only I think.  That should remedy
this whole hangup.  I'm sure the whole drive could be a LINUX drive, like some
flash drives I installed OK. 

I can wipe out the disk and hurt my pride once, but get rid of the GRUB then and
start over.   It shouldn't have an MBR for GRUB to sit in without any partitions. 
Then I can reinstall Windows PE and it should work as before, and then properly
install LINUX with the proper GRUB options during install.  Booting should let me
choose the PCLinux or WindowsPE at bootup then.

I'll sleep  on it and see what I need.  It's just being able to install and uninstall things
correctly that's being experimented with today.


thanks for the response,

patrick013

ASUS EeePc 900HA netbook  1.6 Ghz Atom CPU  1GB RAM
160 GB internal HD    Seagate 250 GB USB portable drive 
Intel ‎Mobile 945GSE Integrated Graphics Controller
Atheros AR242x/AR542x Wireless Network Adapter
Intel (N10/ICH7 Family) High Definition Audio
Dynex 5-Button Wired Optical Mouse
LXDE

Offline kjpetrie

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 3981
Re: remove bootloader
« Reply #10 on: July 30, 2010, 02:37:16 PM »
The structure of a disc is MBR followed by partition table, followed by partitions. Deleting partitions just means clearing the table, but it wont touch the MBR.

If you can boot PE from a flash drive then that's what you would use to remove GRUB and replace it with NTLDR. However, I don't know how to use it as I'm not a Windows user and certainly not at that level.
-----------
KJP
-----------------------------------------------------------
PClos64 RC1 on Intel D945GCLF2 motherboard (Atom 330), 2GB DDR2 RAM, Maxtor STM325031, HL-DT-ST DVDRAM GSA-H42N, Amilo LSL 3220T monitor. Also Acer 5810TG (with custom kernel) and Asus eeePC 2G surf

Offline Yankee

  • Hero Member
  • *****
  • Posts: 1475
  • In theory, theory=practice, in practice ???
Re: remove bootloader
« Reply #11 on: August 03, 2010, 09:45:47 AM »

Hi,

Someone on usenet told me fdisk /mbr would remove the bootloader
by replacing the mbr.

Have to try it tonight.


Patrick013
ASUS EeePc 900HA netbook  1.6 Ghz Atom CPU  1GB RAM
160 GB internal HD    Seagate 250 GB USB portable drive 
Intel ‎Mobile 945GSE Integrated Graphics Controller
Atheros AR242x/AR542x Wireless Network Adapter
Intel (N10/ICH7 Family) High Definition Audio
Dynex 5-Button Wired Optical Mouse
LXDE

Offline pags

  • Hero Member
  • *****
  • Posts: 2515
  • Keep it clean.
Re: remove bootloader
« Reply #12 on: August 04, 2010, 09:47:46 AM »
Not familiar with PE, but as of Vista (or XP?), the fdisk /mbr was replaced by fixmbr, and that was only available on the Recovery Console, or some such...
Sorry, it's been a while  :(