Have been using my drive since 6.04 often just updating, if I want to clean my drive and start again,which is best method to carry this out.
Hard Drive – How to Clean a Hard Drive Before Reinstall
hard drive
Related Solutions
hdparm -i /dev/sdX
gives you the serial number, which is the simplest way I know of to tell apart hard disks of the same brand and size.
The serial number is normally printed on a label on the disk, so although you need to open the case to find it, there's no need disassemble the computer.
Example:
$ sudo hdparm -i /dev/sdb | grep -i serial
Model=SAMSUNG HD253GJ, FwRev=1AJ10001, SerialNo=S24JJ90Z505435
If you want more info lshw -c storage -c disk
gives the most readable output. It's pretty much the same data as Disk Utility, just in command line format.
Here is an annotated example from the most complex setup I have access to, with four disk controllers, seven hard disks, a DVD ROM and a USB disk.
The output has been cut down to size to focus on the interesting parts:
[server ~]$ sudo lshw -c storage -c disk
*-storage
# a 2-port PCI-E SATA controller
description: SATA controller
product: 88SE9123 PCIe SATA 6.0 Gb/s controller
vendor: Marvell Technology Group Ltd.
*-disk
description: ATA Disk
product: WDC WD15EADS-00P
vendor: Western Digital
# 'physical id' corresponds to port number, first port is 0
physical id: 0
logical name: /dev/sdg
serial: WD-WMAVU0849124
size: 1397GiB (1500GB)
*-cdrom
description: DVD reader
product: BD-ROM BR-5100S
vendor: Optiarc
physical id: 1
logical name: /dev/cdrom1
logical name: /dev/dvd1
logical name: /dev/scd0
serial: [Optiarc BD-ROM BR-5100S 1.02 May20 ,2008
*-storage
# mobo controller for eSATA ports. Not used.
description: SATA controller
product: JMB362/JMB363 Serial ATA Controller
vendor: JMicron Technology Corp.
*-ide
# mobo controller for IDE. Not used.
description: IDE interface
product: JMB362/JMB363 Serial ATA Controller
vendor: JMicron Technology Corp.
*-storage
# the primary SATA controller, six ports
description: SATA controller
product: 82801JI (ICH10 Family) SATA AHCI Controller
vendor: Intel Corporation
# 'disk:0' means port 0, same as physical id
*-disk:0
description: ATA Disk
product: WDC WD1600BEVS-0
vendor: Western Digital
physical id: 0
logical name: /dev/sda
serial: WD-WXEY08T58317
size: 149GiB (160GB)
*-disk:1
description: ATA Disk
product: ST32000542AS
vendor: Seagate
physical id: 1
logical name: /dev/sdb
serial: 5XW1RTDS
size: 1863GiB (2TB)
*-disk:2
description: ATA Disk
product: ST32000542AS
vendor: Seagate
physical id: 2
logical name: /dev/sdc
serial: 5XW23W0W
size: 1863GiB (2TB)
[...]
*-scsi
# the USB disk, as evidenced by the bus info
physical id: 1
bus info: usb@1:1
capabilities: emulated scsi-host
*-disk
description: SCSI Disk
product: 10EAVS External
vendor: WD
physical id: 0.0.0
logical name: /dev/sdh
serial: WD-WCAU46029507
size: 931GiB (1TB)
I think the Disk Utility is faster to read; the command line version has the advantage of being usable over ssh and in scripts.
And I still think the serial number is the most reliable solution :)
The "Physical ID" of each drive corresponds to where it is connected to the motherboard. and starts with 0. so a physical ID of 2 would mean that the drive is attached to the 3rd sata port of your mobo or other applicable device.
Your plan sounds good to me. If your MBR is installed on sda then you are right in assuming that you won't be able to boot into Ubuntu easily.
Point 7 will be the one that you will want to look at boot repair.
Your other option could also be to clone your dying drive. If you can temporarily replace your SSD with your new hard drive (or use a USB to SATA connector), you could use dd
to copy over the information from your old hard drive. This would save you the reinstallation of Windows, your programs, your data and your MBR.
- You can do that by having both your old hard drive and your new hard drive connected to your computer.
- Then you start up the computer with a Live CD (or USB).
- Use dd to copy your old drive:
sudo dd if=/dev/sdX of=/dev/sdY bs=16M
You will need to replace /dev/sdX
with the drive letter of your old drive, and /dev/sdY
with your new drive.
You can find out the drive letters with sudo fdisk -l
.
Your new drive will be the disk with no partition information.
It will take a couple hours to copy it, and you won't see any progress updates during that time. If you want a more verbose solution that will even try to copy bad blocks of data, you can use the excellent 'ddrescue' program as well.
To use ddrescue, you will need to enable all repositories in the LiveCD, do a apt-get update and then install it (sudo apt-get install gddrescue
). The command is a bit different too: sudo ddrescue /dev/sdX /dev/sdY
Hope this helps. Let me know if you need more information.
Best Answer
if you do a fresh install, and you select "Use the entire disk" (the most common, and most used option) assuming that you are not needing to dual boot. The installer will automatically delete all the previous partitions, and repartition it as needed. If you are using the latest stable version of Ubuntu, it will format it to Ext4.
You really don't have to dig into any disk utilities unless you really want to, as they will just complicate things or make more work for you. Just let the installer do what it needs to do and it will be fine.