Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Deleting W7 boot loader?

New to Debian (Or Linux in general)? Ask your questions here!
Post Reply
Message
Author
User avatar
Lysander
Posts: 643
Joined: 2017-02-23 10:07
Location: London
Been thanked: 1 time

Deleting W7 boot loader?

#1 Post by Lysander »

I have three hard drives, a main SSD and two other hard drives which contain backup data etc. On one of the backup drives is a Windows 7 loader left over from when Windows 7 was my main OS. These two backup drivers are NTFS as a result of the old Windows install.

Image

I want to get rid of the W7 loader. I know how to remove it from GRUB, but I want to delete it altogether. Is it safe to do this with gparted? Or is the best thing to do transfer the data and format the drive?

Code: Select all

lysander@psychopig-xxix:~$ sudo sfdisk -l
[sudo] password for lysander: 

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

   Device Boot Start     End   #cyls    #blocks   Id  System
/dev/sda1   *      0+     12-     13-    102400    7  HPFS/NTFS/exFAT
/dev/sda2         13   19456   19444  156183930    f  W95 Ext'd (LBA)
/dev/sda3          0       -       0          0    0  Empty
/dev/sda4          0       -       0          0    0  Empty
/dev/sda5         13+  19456   19444- 156183898+   7  HPFS/NTFS/exFAT

Disk /dev/sdc: 9729 cylinders, 255 heads, 63 sectors/track
sfdisk: Warning: extended partition does not start at a cylinder boundary.
DOS and Linux will interpret the contents differently.
Units: cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0

   Device Boot Start     End   #cyls    #blocks   Id  System
/dev/sdc1   *      0+   9329-   9330-  74936320   83  Linux
/dev/sdc2       9329+   9729-    400-   3212289    5  Extended
/dev/sdc3          0       -       0          0    0  Empty
/dev/sdc4          0       -       0          0    0  Empty
/dev/sdc5       9329+   9729-    400-   3212288   82  Linux swap / Solaris

Disk /dev/sdb: 38913 cylinders, 255 heads, 63 sectors/track
Units: cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0

   Device Boot Start     End   #cyls    #blocks   Id  System
/dev/sdb1          1   38912   38912  312560640    f  W95 Ext'd (LBA)
/dev/sdb2          0       -       0          0    0  Empty
/dev/sdb3          0       -       0          0    0  Empty
/dev/sdb4          0       -       0          0    0  Empty
/dev/sdb5          1+  38912   38912- 312560608+   7  HPFS/NTFS/exFAT

User avatar
Ardouos
Posts: 1077
Joined: 2013-11-03 00:30
Location: Elicoor II
Has thanked: 1 time
Been thanked: 4 times

Re: Deleting W7 boot loader?

#2 Post by Ardouos »

Lysander wrote:Or is the best thing to do transfer the data and format the drive?
This is the simplist option tbh.

Always backup any data you want to protect.
There is only one Debian | Do not break Debian | Stability and Debian | Backports

⢀⣴⠾⠻⢶⣦⠀
⣾⠁⢠⠒⠀⣿⡁ Debian - The universal operating system
⢿⡄⠘⠷⠚⠋⠀ https://www.debian.org
⠈⠳⣄⠀

Dai_trying
Posts: 1101
Joined: 2016-01-07 12:25
Has thanked: 5 times
Been thanked: 16 times

Re: Deleting W7 boot loader?

#3 Post by Dai_trying »

And before you re-format anything make sure grub is installed on your Linux Hdd and not one of the "data disks" otherwise you might have issues getting back into your OS.

User avatar
Lysander
Posts: 643
Joined: 2017-02-23 10:07
Location: London
Been thanked: 1 time

Re: Deleting W7 boot loader?

#4 Post by Lysander »

Dai_trying wrote:And before you re-format anything make sure grub is installed on your Linux Hdd and not one of the "data disks" otherwise you might have issues getting back into your OS.
GRUB has to be installed on the main Linux HDD because before I installed Debian I pulled out the SATA cables of the other backup drives. From previous experience, if I leave the cables in but still choose my main SSD on install, when the OS has finished installing and I reboot, I just get a black screen and a blinking cursor. I don't understand why this happens, so when I install a new OS I always remove the SATA cables from the backup drives to make sure everything is installed on one drive only. Then I simply reattach. This is also a safety precaution just in case anything from the other drives gets wiped by mistake.

Yes, I suppose I should reformat. Though it would be easier to delete the partition, but that's the lazy option.

Dai_trying
Posts: 1101
Joined: 2016-01-07 12:25
Has thanked: 5 times
Been thanked: 16 times

Re: Deleting W7 boot loader?

#5 Post by Dai_trying »

Lysander wrote:Yes, I suppose I should reformat. Though it would be easier to delete the partition, but that's the lazy option.
You would need to wipe the MBR of the "data drives" to clear the windows bootloader, and that can be hazardous if you try to do it with important data on the drive still, so I would say re-formatting was the easy/lazy option (which I would do) :D

User avatar
Lysander
Posts: 643
Joined: 2017-02-23 10:07
Location: London
Been thanked: 1 time

Re: Deleting W7 boot loader?

#6 Post by Lysander »

Dai_trying wrote:
Lysander wrote:Yes, I suppose I should reformat. Though it would be easier to delete the partition, but that's the lazy option.
You would need to wipe the MBR of the "data drives" to clear the windows bootloader, and that can be hazardous if you try to do it with important data on the drive still, so I would say re-formatting was the easy/lazy option (which I would do) :D
Good point. But would I need to reformat both data drives, rather than just the one with the loader on it?

Also should I reformat with NTFS or ext4? I imagine the latter.

Dai_trying
Posts: 1101
Joined: 2016-01-07 12:25
Has thanked: 5 times
Been thanked: 16 times

Re: Deleting W7 boot loader?

#7 Post by Dai_trying »

You would only need to re-format the drive with the bootloader, but personally I would re-format them both just to be sure they are both clean and I would use ext4 if you are only using Linux, although that is just my preference and there are many options available.

Re-formatting is very quick and easy compared to time gone by, using gparted you can have a disk cleared in not many minutes at all, simply select the drive and then select Device from the menu bar and click on "create Partition table". This should present you with an empty drive where you can simply populate it with the partitions of your choosing.

User avatar
dasein
Posts: 7680
Joined: 2011-03-04 01:06
Location: Terra Incantationum

Re: Deleting W7 boot loader?

#8 Post by dasein »

Lysander wrote:...when I install a new OS I always remove the SATA cables from the backup drives to make sure everything is installed on one drive only. Then I simply reattach. This is also a safety precaution just in case anything from the other drives gets wiped by mistake.
Count yourself lucky that you're doing this today, as opposed to, say, a decade ago. I inadvertently drove myself stark raving nuts for the better part of a week when I did exactly that same thing when I moved from OS/2.

As a rank beginner in Linux, everything I was doing inherently qualified as something potentially stupid. So, to protect my existing Warp install and my data, I'd dutifully detach cables from my existing HDD, and then spend 45 minutes or so installing and configuring Linux onto a brand new HDD. Then I'd reattach the cables, reboot, and watch in horror and frustration as my brand new Linux install would die in a kernel panic, insisting that it couldn't "find" the OS that I'd just finished installing. I lost count of how many times I went through this ritual, but suffice it to say I was ready to spit nails.

Just for fun, I'm going to challenge any old-timers here to guess what the root of the problem was. I'll offer one hint: these were old-style IDE drives (PATA not SATA).
Lysander wrote:Yes, I suppose I should reformat. Though it would be easier to delete the partition, but that's the lazy option.
:lol: If anything, you are being insufficiently lazy about this matter. You've already invested a disproportionate amount of time and energy (both yours and others') just to remove a vestigial bootloader. If you ask me, you need better hobbies. :razz:

User avatar
sunrat
Administrator
Administrator
Posts: 6461
Joined: 2006-08-29 09:12
Location: Melbourne, Australia
Has thanked: 116 times
Been thanked: 472 times

Re: Deleting W7 boot loader?

#9 Post by sunrat »

dasein wrote:Just for fun, I'm going to challenge any old-timers here to guess what the root of the problem was. I'll offer one hint: these were old-style IDE drives (PATA not SATA).
Slave mode rather than Master?

@Lysander - it's pretty easy to either wipe the MBR or reformat the whole disk. It's also pretty easy to accidentally destroy all the data on the disk while doing so. Make sure you have a full backup. See my sig. ;)
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!

User avatar
dasein
Posts: 7680
Joined: 2011-03-04 01:06
Location: Terra Incantationum

Re: Deleting W7 boot loader?

#10 Post by dasein »

sunrat wrote:
dasein wrote:Just for fun, I'm going to challenge any old-timers here to guess what the root of the problem was. I'll offer one hint: these were old-style IDE drives (PATA not SATA).
Slave mode rather than Master?
That's "close enough" for one half of it. But now ask yourself why that would matter? (Hint #2: Why would I imply that the problem would no longer plague those who use that exact same method today?)
sunrat wrote:See my sig. ;)
Coolest damn sig in the place, IMO

Ok, this thread is now officially hijacked.

User avatar
Thorny
Posts: 542
Joined: 2011-02-27 13:40

Re: Deleting W7 boot loader?

#11 Post by Thorny »

dasein wrote:Just for fun, I'm going to challenge any old-timers here to guess what the root of the problem was. I'll offer one hint: these were old-style IDE drives (PATA not SATA).
My guess, device name (hdx) was enumerated differently during boot. And, today we have UUID.
dasein wrote:Ok, this thread is now officially hijacked.
I'm guessing Lysander won't mind. However, I apologise anyway.

Dai_trying
Posts: 1101
Joined: 2016-01-07 12:25
Has thanked: 5 times
Been thanked: 16 times

Re: Deleting W7 boot loader?

#12 Post by Dai_trying »

sunrat wrote:@Lysander - it's pretty easy to either wipe the MBR or reformat the whole disk. It's also pretty easy to accidentally destroy all the data on the disk while doing so. Make sure you have a full backup. See my sig. ;)
Always good advice, but I didn't mention it as the OP already stated to transfer data (a backup of sorts) before reformatting. :)

User avatar
dasein
Posts: 7680
Joined: 2011-03-04 01:06
Location: Terra Incantationum

Re: Deleting W7 boot loader?

#13 Post by dasein »

Thorny wrote:
dasein wrote:Just for fun, I'm going to challenge any old-timers here to guess what the root of the problem was. I'll offer one hint: these were old-style IDE drives (PATA not SATA).
My guess, device name (hdx) was enumerated differently during boot. And, today we have UUID.
There ya go. During boot, identification of those PATA drives was basically tied to their cable position. And before UUID (or better still, LABELs), fstab basically hard-coded device references for each mount point. So every time I'd reconnect the OS/2 drive, hda became hdb; result: kernel panic. (I remember seething at the sheer stupidity of hard-coding devices in fstab, basically turning it into an unnecessary point of failure.)
Thorny wrote:
dasein wrote:Ok, this thread is now officially hijacked.
I'm guessing Lysander won't mind. However, I apologise anyway.
What Thorny said. (Sorry, Lysander.)

Edit: typos
Last edited by dasein on 2017-06-07 11:48, edited 1 time in total.

User avatar
Thorny
Posts: 542
Joined: 2011-02-27 13:40

Re: Deleting W7 boot loader?

#14 Post by Thorny »

dasein wrote: And before UUID (or better still, LABELs), fstab basically hard-coded device references for each mount point.
Yeah, I prefer LABELS also. I can usually remember what I have labelled a drive, UUID not as easy to remember. ;-)

Even though this is an aside, there might be some useful aspects to it for some of those reading and no one is complaining that we are not "nice" to them.

User avatar
Lysander
Posts: 643
Joined: 2017-02-23 10:07
Location: London
Been thanked: 1 time

Re: Deleting W7 boot loader?

#15 Post by Lysander »

Dai_trying wrote:You would only need to re-format the drive with the bootloader, but personally I would re-format them both just to be sure they are both clean and I would use ext4 if you are only using Linux, although that is just my preference and there are many options available.

Re-formatting is very quick and easy compared to time gone by, using gparted you can have a disk cleared in not many minutes at all, simply select the drive and then select Device from the menu bar and click on "create Partition table". This should present you with an empty drive where you can simply populate it with the partitions of your choosing.
I will reformat the smaller of the backup drives, which is the one with the bootloader. However, the larger one is also the largest disk I have and is almost full. I have nowhere to transfer all that data to. That, in itself, I have just realised, is something of an issue and which I should do something to rectify.
dasein wrote: :lol: If anything, you are being insufficiently lazy about this matter. You've already invested a disproportionate amount of time and energy (both yours and others') just to remove a vestigial bootloader. If you ask me, you need better hobbies. :razz:
I love the term "vestigial bootloader"! And "insufficiently lazy", come to think of it. It's a kind of productive laziness, but it's better than procrastination.

@Thorny et al - no need to apologise for the thread hijack. This thread has already come out with plenty of useful information for me, of varying sorts.

Post Reply