Repartition Hard Drive with Dual OS and Not Losing Data - Page 1
Forum section: electronics / general

author: bostonman
author_rank: Super Contributor
timestamp: January 02, 2023, 12:08:46 am
content: I have an old laptop with dual operating systems, XP and Ubuntu. Due to updates, Ubuntu is near the end of its partition size.I'd like to increase the partition size, but don't want to risk losing either OS.A few places online explained how to perform this, but I'm uncertain whether they were accurate. Does anyone know an easy way to resize the partition for Ubuntu without damaging either OS?

author: IanB
author_rank: Super Contributor
timestamp: January 02, 2023, 12:20:45 am
content: To increase a partition size, there needs to be some empty space to increase into. If the disk is already fully occupied, then you will need to decrease another partition to make room. And to do that you may need to defragment it first, in order to move all the empty space to the end before you shrink it.To do these operations it is best to use a trusted and reliable tool. I have used the tools built into Windows 7 or 10 for this, but I have no experience of XP. There are of course third party tools available--"Partition Magic" comes to mind, but it is not the only one.If you have any fear of data loss, then it would be a good idea to make an image backup first, and make sure you have backed up all your important data as well.That said, I have done this kind of operation from time to time and it has gone smoothly.

author: bostonman
author_rank: Super Contributor
timestamp: January 02, 2023, 12:28:39 am
content: QuoteYes, correct. I didn't mention that part of it, but I plan to shrink the XP section a bit. I mainly use this laptop for random stuff, so I can afford to lost size on XP.

author: BradC
author_rank: Super Contributor
timestamp: January 02, 2023, 04:22:08 am
content: Grab a copy of systemrescuecd and fire up gparted. It can resize and move as required, although moving a partition is a *slow* process.

author: bostonman
author_rank: Super Contributor
timestamp: January 02, 2023, 04:27:59 am
content: Is systemrescuecd part of Gparted or are they to be used together?

author: IanB
author_rank: Super Contributor
timestamp: January 02, 2023, 04:52:40 am
content: Quote from: bostonman on January 02, 2023, 04:27:59 amI believe systemrescuecd is a CD that boots into a system rescue version of Linux, and from there you can run Gparted and rearrange your disk partitions while none of the installed operating systems are running.

author: BradC
author_rank: Super Contributor
timestamp: January 02, 2023, 06:02:25 am
content: Quote from: IanB on January 02, 2023, 04:52:40 amPrecisely. Traditionally a CD image, but easy enough to pop onto a USB using the instructions on the site. So useful I keep multiple copies around, a partition on my larger USB connected drives and PXE boot from the server at home.Boot into systemrescuecd. Start X (startx) then run gparted from the x-terminal (gparted).A combination of systemrescuecd and a working net connection (for searches) is like a get out of jail free card for IT.

author: Doctorandus_P
author_rank: Super Contributor
timestamp: January 07, 2023, 04:40:11 pm
content: Quote from: bostonman on January 02, 2023, 12:08:46 amIf the "not losing your OS (or data)" is dear to you, then start with at least making a backup. Or simpler:Buy a bigger SSD (if that works) or HDD (if your old laptop does not support SSD's)The prices of such hardware is so low that it is silly to consider another option.My data is worth much more than all my PC hardware together. My data is irreplaceable, while PC hardware is easily replaceable commodity stuff.Here in the Netherlands there are lots of shops who sell second hand PC hardware from office equipment for low prices.You can get a new 1TB 2.5" HDD for EUR50, or a second hand 500GB for EUR20.Old PC's tend to have 120GB or smaller. If you buy a bigger disk, you can clone the old one to the new one, and then keep on using the old one as a backup. That way you have both more room and a decent backup for a modest price.Also, I would not think twice about loosing the Ubutu OS. Re-installing fresh is 5 minutes of work and may 15 minutes of coffee drinking if your pc is slow. You can use dpkg to create a list of installed packages (and then re-install them) but in my experience it's better to simply make a list of programs you like, and then only re install those. It takes more time, but it sheds off a lot of accumulated crud.

author: bostonman
author_rank: Super Contributor
timestamp: January 09, 2023, 04:34:05 am
content: QuoteI fully agree with you.This laptop is really junk since it has XP, but I have a hard time parting with computers, especially laptops. I've found that sometimes I need an older unit to handle a particular piece of software or hardware, or I like a throw around laptop, etc...In any case, I think my plan wasn't to use Ubuntu as much as I have, so I didn't partition it too big thus focusing the space on XP. Now it's had several updates, I've used it to create hard drive images (which I think I've saved to the XP partition - but don't remember), etc... so I've got messages about low disk space.On a side note, I should also buy new backup drives because I have three external ones (on a network switch) that are mirror images of each other. I only connect/power them when I want to backup my main computer, but the drives are old.They are 1TB and over a decade old, but again, not always powered.

author: bostonman
author_rank: Super Contributor
timestamp: January 15, 2023, 02:43:49 pm
content: I started this yesterday and got a warning that I may lose my boot sector (?).All I did was shrink the XP partition and expand the Ubuntu partition by making more room at the beginning.Is that error normal, or, if I had proceeded, would have lost data?

author: rdl
author_rank: Super Contributor
timestamp: January 15, 2023, 05:54:59 pm
content: How big is the laptop's disk? Whatever it is, maybe just replacing it with a newer and bigger one would be the best thing to do.

author: bostonman
author_rank: Super Contributor
timestamp: January 16, 2023, 03:18:24 am
content: QuoteIt's an old system running XP. Ubuntu serves me well sometimes, but I've noticed different old laptops continue to serve different purposes.Anyway, you bring up a good point as I was considering just installing a bigger hard drive (currently has 120GB). If I do that, what happens to both partitions? One is approximately 15GB and the other is approximately 90GB (it doesn't add to 120, so I may be wrong to exact sizes, and know 120 could be slightly smaller), but it also has a few other partitions (maybe stuff from Dell).

author: rdl
author_rank: Super Contributor
timestamp: January 16, 2023, 11:44:29 am
content: I did exactly this on an old Windows 7 32 bit machine last year, but I don't remember all the details of how I did it and it was a desktop not a laptop. I do know all I used was the built in back up and diskpart utilities. Does your laptop have room for a second drive?

author: magic
author_rank: Super Contributor
timestamp: January 16, 2023, 12:23:02 pm
content: What's the current order of partitions? Post something likefdisk -lIt generally is possible to shrink FAT32/NTFS partitions, move partitions around and enlarge most Linux filesystems.However, if something goes wrong during the process (unexpected I/O errors, power loss, system crash) you may end up in a weird state that would be extremely difficult to recover from.That being said, I have done such things a few timesDoing it on a second HDD avoids the risk of data loss. Simply clone everything, including OEM service partitions, then manipulate as desired.

author: themadhippy
author_rank: Super Contributor
timestamp: January 16, 2023, 12:33:18 pm
content: If theres room to add a second drive you could leave the partitions alone and just move your ubuntu home file to the new drive.

author: bostonman
author_rank: Super Contributor
timestamp: January 16, 2023, 02:04:35 pm
content: I'll post an fdisk later. No room for a second hard drive.So should I ignore the error I mentioned above (I may lost boot data or something like that if I change the partitions)?

author: themadhippy
author_rank: Super Contributor
timestamp: January 16, 2023, 02:16:12 pm
content: QuoteIf your 101% certain your back ups are good then there's nothing to loose.

author: bostonman
author_rank: Super Contributor
timestamp: January 17, 2023, 03:25:54 am
content: Well, I was more curious whether the error is valid or if a typical warning as a precaution.

author: IanB
author_rank: Super Contributor
timestamp: January 17, 2023, 03:33:08 am
content: Quote from: bostonman on January 17, 2023, 03:25:54 amNever ignore warnings. They are there for a reason. If you proceed and make the disk unbootable, would you have a recovery plan?

author: IanB
author_rank: Super Contributor
timestamp: January 17, 2023, 03:34:23 am
content: Quote from: bostonman on January 16, 2023, 02:04:35 pmThe standard protocol that I have always used is to clone the old disk onto a new, bigger disk, swap the disks, and keep the old disk as a backup.

author: bostonman
author_rank: Super Contributor
timestamp: January 17, 2023, 03:38:06 am
content: QuoteI am aiming that way as the drive is only 120GB. I'm not sure what I'll use this XP/Ubuntu 32-bit laptop for that will need bigger, but I just looked, and a WD Blue SSD is $35 for a 250GB.I don't believe my previous question got answered. If I clone the drive 120GB > 250GB (easy to do because I have a cloning device), what happens to each partition? Will I still need to adjust them or will both grow by X ?

author: IanB
author_rank: Super Contributor
timestamp: January 17, 2023, 04:21:23 am
content: Quote from: bostonman on January 17, 2023, 03:38:06 amIf you buy a new disk it usually comes with free cloning software. Read the instructions for that software. As I recall from the last time I did this, it allowed me to choose the destination partitions before starting the copy. It goes something like this:1. Select old disk2. Select new disk3. Choose layout of new disk4. "Go"

author: magic
author_rank: Super Contributor
timestamp: January 17, 2023, 09:12:23 am
content: Quote from: bostonman on January 17, 2023, 03:38:06 amNothing happens; partitions are preserved exactly as they stood on the source disk. There will be unallocated space at the end.If the partition you want to enlarge is the final one then it's a very easy job. If not, you will need to move stuff around.

author: BradC
author_rank: Super Contributor
timestamp: January 17, 2023, 09:41:56 am
content: I clone using dd, then you just put the partitions where you want them and expand them out to use the remaining space. Saves double handling and at the end of the day you are still going to have to correct the NT Bootloader.

author: SiliconWizard
author_rank: Super Contributor
timestamp: January 17, 2023, 08:16:33 pm
content: Clonezilla works fine.I've also used commercial apps for this.

author: bostonman
author_rank: Super Contributor
timestamp: January 20, 2023, 05:11:07 am
content: I found a WD 500GB for $34 each on Amazon.Interestingly enough, the other day these were priced much higher. When I viewed them Tuesday (?) they were listed as $34 which I thought was odd. I thought maybe it was selecting 250GB, so I clicked on that, clicked back, etc... and suddenly the price was higher (maybe 60 something dollars).I closed the browser, searched again, and sure enough it was again $34 for 500GB, so I purchased two of them.Anyway, hopefully I get the 500GB. They should arrive tomorrow, so I'll backup the 120GB onto the 500GB, and then re-partition; maybe 250GB each (XP and Ubuntu).Hopefully the partition is a smooth process.BTW, I have a duplicator, so duplicating hard drives is simple (providing the destination is larger than the source).

author: bostonman
author_rank: Super Contributor
timestamp: February 06, 2023, 04:09:58 am
content: I began swapping the drive in my Win7 laptop by using a stand alone hard drive copier.The new hard drive is 500GB, and, after copying the old 120GB (?) hard drive to the 500GB, it had all the new additional space as un-alloted. I went into disk manager (in Win7) and expanded the C: drive to approximately 250GB by adding 100GB to the used 150GB (I'm rounding off for purposes of discussion).Now I have 250GB of unassigned space.I went to install Ubuntu and selected 'something else' and attempted to figure out which section was the unassigned. Apparently I did it wrong because I lost Win7 and had to recopy the old drive.From reading, I need to select 'copy along side of Windows boot manager'.I'm uncertain what this means. To me it implies I'm installing Ubuntu on the assigned 250GB partition that Win7 is on, and they'll work together to load whichever one I select; but I'll have unused 250GB on the unassigned partition.Obviously my goal is to put Win7 on partition A and Ubuntu on partition B.Is selecting 'along side Windows' the correct method and then later it will format the new partition?

author: IanB
author_rank: Super Contributor
timestamp: February 06, 2023, 04:30:18 am
content: From what I understand, booting is a two stage process. There is part of the disk with something called a boot manager, which is outside any of the data partitions. If you only have one OS installed, the boot manager jumps straight to the installed OS, which then then does its own stuff and starts up.However, if you have two OS's installed, each in their own partition, then the boot manager will prompt on startup and ask which OS you want to boot into. This is what "alongside" means. If you try to install a second OS alongside an existing OS, the installer for the second OS will modify the boot manager so it knows about both OS's and can display the prompt on startup. The installer for the second OS should show you a map of the disk and offer you the chance to create a new partition in some empty space, or ask if you want to overwrite something already there, or even completely reformat the disk from scratch.Since I am completely inexperienced in doing this, I think the best approach is to read the manual/documentation very carefully and follow whatever instructions are given. If you experiment without doing this, things may not go the way you would like.

author: bostonman
author_rank: Super Contributor
timestamp: February 06, 2023, 04:38:05 am
content: I've had success doing this in the past, but I forget what I did and proceeded somewhat blindly (i.e. I got lucky).What you said makes sense. I didn't think it did some magic install like Win and Ubuntu all together, but the descriptions aren't really clear on what each option means (I'm sure it's quite easy for the more experienced).

author: BradC
author_rank: Super Contributor
timestamp: February 06, 2023, 05:46:24 am
content: Ordinarily on legacy hardware I'd get windows working by itself first. On legacy hardware, windows installs a boot sector which then chains to its boot manager and it just loves to trample over anything else on the drive. Windows boot manager *can* be made to boot additional operating systems, but I never got it to work reliably or easily.Once Windows is booting reliably, then I'd add a partition for Ubuntu and install Grub as the boot manager. That'll overwrite the windows boot sector and install Grub as the boot loader. When you've completed the Ubuntu install the grub configuration scripts will scan the disk, find the windows partition and add that to the boot menu automatically. Then when you reboot, grub will ask you whether you want Linux or Windows and it'll all behave.The best part of this for you is if you blow it up, you can re-clone and go around again.

author: themadhippy
author_rank: Super Contributor
timestamp: February 06, 2023, 12:58:31 pm
content: Quoteno.it will try and install on the same partition as windows. Id run a live disc, fire up qparted and adjust the space windows has to the full disc,the alongside option should work fine then.

author: bostonman
author_rank: Super Contributor
timestamp: March 01, 2023, 01:41:57 am
content: QuoteI'm digging up an older thread I started.Just a reminder, I have an old laptop with XP and Ubuntu (32-bit) and ran out of space for Ubuntu. They share a 120GB drive with (I think) 20GB or so dedicated to Ubuntu. Anyway, I copied the 120GB to a 500GB using a duplicator.The problem is now I have (rounding off) 400GB of unallocated space. Using Gparted, it shows the XP partition, Ubuntu, and two small partitions (I'm assuming they are Dell recovery). It won't let me expand any partitions into the "unallocated" space.I tried making the 400GB a new partition, but Gparted is stating I can't make more than four primary partitions. I tried deleting the two small partitions which allowed me to make the 400GB a new partition (but not sure what I lost in the process by deleting the two small partitions), however, it still wouldn't allow me to expand the two main partitions (XP and Ubuntu).Does anyone know what I can try?

author: BradC
author_rank: Super Contributor
timestamp: March 01, 2023, 05:28:47 am
content: Post the results of fdisk -l /dev/whatever your disk is.There are some peculiarities with dos partition tables, one is up you get 4 primary partitions. As you’ve discovered you can remove one and replace it with a secondary partition table, but it gets a bit complex there. We need to see what you have to be able to help further.

author: bostonman
author_rank: Super Contributor
timestamp: March 02, 2023, 12:57:08 am
content: QuoteDo you want each partition (I think they are labeled SDx)?Unfortunately I should re-copy the original drive again since I messed with the partitions. I know you want the screen shot of the disks, but just thinking out loud. The problem seems to be that once I created the new partition (after deleting the small Dell factory installation partitions (?), gparted wouldn't let me expand either the XP or the Ubuntu partition into the new one.The partitions could be shrunk, but not expanded.

author: BradC
author_rank: Super Contributor
timestamp: March 02, 2023, 05:50:36 am
content: This (noting mine is GPT not MBR, but same same) :Code:root@bklaptop:/home/brad# fdisk -l /dev/nvme0n1Disk /dev/nvme0n1: 1.82 TiB, 2000398934016 bytes, 3907029168 sectorsDisk model: SHGP31-2000GMUnits: sectors of 1 * 512 = 512 bytesSector size (logical/physical): 512 bytes / 512 bytesI/O size (minimum/optimal): 512 bytes / 512 bytesDisklabel type: gptDisk identifier: 737ADFEF-F496-8A47-ACD1-66F8194FD58DDevice Start End Sectors Size Type/dev/nvme0n1p1 2048 411647 409600 200M EFI System/dev/nvme0n1p2 411648 210126847 209715200 100G Apple APFS/dev/nvme0n1p3 210126848 419842047 209715200 100G Microsoft basic data/dev/nvme0n1p4 419842048 461785087 41943040 20G Linux filesystem/dev/nvme0n1p5 461785088 503728127 41943040 20G Linux swap/dev/nvme0n1p6 503728128 3485020159 2981292032 1.4T Linux filesystem/dev/nvme0n1p7 3485020160 3907029134 422008975 201.2G Linux reserved

author: bostonman
author_rank: Super Contributor
timestamp: March 03, 2023, 10:30:33 pm
content: Is this what you want?

author: BradC
author_rank: Super Contributor
timestamp: March 04, 2023, 01:49:31 am
content: Not really. You're trying to list the partition table on a partition.Don't use sda3, use sda.

author: bostonman
author_rank: Super Contributor
timestamp: March 04, 2023, 10:25:25 pm
content: Is this better?

author: BradC
author_rank: Super Contributor
timestamp: March 05, 2023, 02:46:02 am
content: Yep.sda4 is the extended partition table and sda5 is the content of that partition.If you can find out what sda5 is it'd be useful.My strategy would be to delete sda5 & 4 (you need to delete 5 before you can dump the extended partition table).You can then extend sda3 out to use all the available space on the disk (or whatever size you like). If you need more partitions you can then add a new extended table at 4 and up to 4 partitions in that.You won't be able to do anything until you lose the extended partition table (sda4) as that'll be blocking gparted from moving/resizing anything.If the contents of sda5 are valuable, I'd dd them into a file, do the move and shuffle while creating the extended table and additional partition at the end then dd the contents of the file back. The only thing you need to do is make sure the sda5 partition is exactly the same size when you re-create it.To see if you can figure out what's on sda5 try :blkid /dev/sda5The other thing you can try is to mount it :mount /dev/sda5 /mntif it mounts : ls -la /mnt

author: magic
author_rank: Super Contributor
timestamp: March 05, 2023, 07:40:27 am
content: You should be able to expand sda4 into the new unallocated space and create a new logical partition sda6 (or even multiple partitions) inside it.This may or may not be all that you need.I believe gparted should also be able to move sda4 to the end of the disk to create space for sda3 expansion.Such move ought to be safe because source and destination locations don't overlap at all, so all original data will still be in place until everything is copied over.Subsequent expansion of sda3 is generally a safe operation.The process described by BradC is basically doing sda4/sda5 move manually, but I think gparted may be able to do it fully automatically.If unsure, make backups of at least sda3 and sda5. They aren't big partitions so not a big problem to backup.editI think this is likely to work if gparted refuses to simply move sda4 with all contents to the right:- expand sda4 to the right to fill the unallocated space- move sda5 inside sda4 to the right as far as it will go- shrink sda4 from the left as far as the new position of sda5 allows- expand sda3 to the right until it hits sda4

author: bostonman
author_rank: Super Contributor
timestamp: March 11, 2023, 01:03:45 am
content: I’m uncertain if this advice will work.Long story short, I have a much simpler XP hard drive in an oscilloscope that I’m working on simultaneously.It is a 32GB (technically about 29.7) and two partitions: the main and a factory reinstallation partition. Currently it’s only using about 9GB between both and the rest is unallocated.I made a new partition with the remaining (approx) 20GB, and couldn’t expand either one of the other two into the 20GB; it seems to be treating it as a whole separate drive.

author: bostonman
author_rank: Super Contributor
timestamp: May 16, 2023, 02:39:21 am
content: I haven't addressed this issue for sometime as I got distracted with other stuff.I still have my laptop with wasted partition space. Obviously I read the section about using dd, but I'm uncertain about the steps.Keep in mind, this has a XP partition, Ubuntu partition, and then two (?) Dell partitions. Gparted doesn't allow me to add a fifth (?) partition, however, even when I delete an assumed useless Dell partition, it still treats the unallocated partition as a completely separate drive.The new hard drive is 500GB, and the current one is 120GB (I think it's approximately: 80GB for XP and 40GB for Ubuntu, along with smaller ones for Dell). I'd like to make it 250GB for XP and 250GB for Unbuntu.

author: magic
author_rank: Super Contributor
timestamp: May 16, 2023, 08:00:57 am
content: Quote from: magic on March 05, 2023, 07:40:27 amNote that except for creation of partition tables, gparted doesn't make modifications to disk until you click "apply changes" or something like that, so it's safe to experiment and see what it can or cannot do.

author: bostonman
author_rank: Super Contributor
timestamp: May 17, 2023, 02:59:22 am
content: I know clicking 'apply' is needed to execute.All the used partitions are expanded. The unallocated remains untouchable.

author: BradC
author_rank: Super Contributor
timestamp: May 17, 2023, 06:31:55 am
content: You need to expand sda4 (the extended partition) before you can resize sda5.Any chance you can do an :sfdisk -d /dev/sdaand paste it (not screenshot) into a post?I can use that to replicate your partition table locally and have a play with gparted to see what the limitations might be.Mine looks like this :Code:root@bkd:/home/brad# sfdisk -d /dev/nvme0n1label: gptlabel-id: 88CD8B24-FF53-9A42-8996-8DC764F97AA8device: /dev/nvme0n1unit: sectorsfirst-lba: 2048last-lba: 3907029134sector-size: 512/dev/nvme0n1p1 : start= 2048, size= 125829120, type=0FC63DAF-8483-4772-8E79-3D69D8477DE4, uuid=C0BBEE74-5078-6340-97B7-6A702D58080B/dev/nvme0n1p2 : start= 125831168, size= 2147483648, type=0FC63DAF-8483-4772-8E79-3D69D8477DE4, uuid=0C53AD48-1CFC-B14E-A8C7-95FA75B2250B/dev/nvme0n1p3 : start= 2273314816, size= 206317933, type=EBD0A0A2-B9E5-4433-87C0-68B6B72699C7, uuid=055C1BC7-7494-11ED-9D1B-D85ED386CCC8, name="Basic data partition"

author: bostonman
author_rank: Super Contributor
timestamp: May 17, 2023, 04:50:57 pm
content: See attached

author: magic
author_rank: Super Contributor
timestamp: May 17, 2023, 04:55:40 pm
content: Quote from: BradC on May 17, 2023, 06:31:55 amThis is exactly what's blocking you. Can't move sda5 outside of sda4.

author: bostonman
author_rank: Super Contributor
timestamp: May 17, 2023, 05:11:33 pm
content: Think I tried deleting one of the smaller partitions (it's an old Dell and assume this is some factory reinstallation even though I have all the CDs), and don't believe I could expand into the unallocated partition.

author: RAPo
author_rank: Super Contributor
timestamp: May 17, 2023, 06:22:06 pm
content: yep thats the way to go.

author: bostonman
author_rank: Super Contributor
timestamp: May 17, 2023, 06:25:49 pm
content: Which is the way to go?Deleting a partition (if I remember correctly) didn't help.

author: RAPo
author_rank: Super Contributor
timestamp: May 17, 2023, 06:37:42 pm
content: Sorry my bad. was referring toQuote from: BradC on January 17, 2023, 09:41:56 amif you want to do it under Linux, personally I use diskgenius, professional:https://www.diskgenius.com/

author: bostonman
author_rank: Super Contributor
timestamp: May 21, 2023, 02:07:03 pm
content: I'm downloading it, however, it looks like it's for Windows according to the user guide:Supported operating system: Windows 2000/XP/Vista/7/8/8.1/10, SmallBusiness Server 2011/2003/2008, Windows home server 2011, and WindowsServer 2003/2008/2008R2/2012/2012 R2/2016/2019 (both 32bit and 64bit).Will I need to delete a partition or will this allow me to expand the XP and Ubuntu into the unallocated partition?

author: RAPo
author_rank: Super Contributor
timestamp: May 21, 2023, 02:16:21 pm
content: yes, disk genius is for Windows.Choose a partition, choose free space and it will expand

author: bostonman
author_rank: Super Contributor
timestamp: May 21, 2023, 02:20:07 pm
content: I assumed it was for Windows, but you mentioned doing it through Linux, so I thought maybe a Linux version was needed.I have to look again, but believe what I want to do is expand the XP partition to approximately 250GB, and the Ubuntu partition to the remaining 250GB.Hopefully this will take care of it for me

author: RAPo
author_rank: Super Contributor
timestamp: May 21, 2023, 02:33:44 pm
content: I need to add better punctuation: under Linux was referring to the quote from Bradic.

author: bostonman
author_rank: Super Contributor
timestamp: May 21, 2023, 02:38:01 pm
content: Oh okay.In any case, I'll try this program later today hopefully. I thought since gparted didn't work, then nothing else would work.

author: bostonman
author_rank: Super Contributor
timestamp: May 21, 2023, 02:44:43 pm
content: The user manual states it works on XP, but I just tried and it doesn't work.

author: RAPo
author_rank: Super Contributor
timestamp: May 21, 2023, 02:53:53 pm
content: did you download the 32-bit version? seehttps://www.portablefreeware.com/index.php?id=3021for a link.

author: bostonman
author_rank: Super Contributor
timestamp: June 13, 2023, 01:48:17 am
content: I've been tinkering with Disk Genius, but been having issues.First it said I needed to scan the drive for errors before I could resize a partition. From what I understood, it showed the unallocated on the right with the Ubuntu in the middle and XP on the left. Trying to expand XP didn't work, and seemed I needed to "move" Ubuntu all the way to the right, expand it to the left, and then hope I could expand XP to the right.The issue is needed to scan the drive for errors (or found errors and needed to be scanned). After it found three or four errors, but needed Disk Genius on a thumbdrive because it couldn't work where Disk Genius was.Tonight I did a scan and it didn't find any errors. When I went to move/resize the Ubuntu partition, it gave me errors:The cluster of a file is marked as free or cross linked with another file in node 134483, cluster 3186432Some free inodes are marked as used in inode bitmap file: 131077Same message but bitmap file 141094Some free clusters are marked as used in block bitmap: cluster number: 9257

author: RAPo
author_rank: Super Contributor
timestamp: June 13, 2023, 06:13:19 am
content: The procedure you describe is correct, but before doing anything, make a backup of the *disk* to an image file. Just right-click on the disk and choose "backup disk to image file".If anything goes wrong, you can always go back to the original state.As for the errors: do a verify/repair: right click on a portion.

author: DiTBho
author_rank: Super Contributor
timestamp: June 13, 2023, 07:52:37 am
content: always do a backup

author: bostonman
author_rank: Super Contributor
timestamp: June 13, 2023, 07:02:09 pm
content: It found this errors when disk genius was on the hard drive, but wouldn’t allow me to repair. I moved disk genius to a thumb drive, and it didn’t find any errors; so I couldn’t do a repair.Not sure why it didn’t find errors the second time.

author: bostonman
author_rank: Super Contributor
timestamp: June 19, 2023, 12:49:06 am
content: I can't get this to work.A full scan doesn't show any errors, but I get the same four errors when trying to move/resize the partition:The cluster of a file is marked as free or cross linked with another file in node 134483, cluster 3186432Some free inodes are marked as used in inode bitmap file: 131077Same message but bitmap file 141094Some free clusters are marked as used in block bitmap: cluster number: 9257I also tried a 'repair', but it produced the same errors.

author: Ed.Kloonk
author_rank: Super Contributor
timestamp: June 19, 2023, 01:56:13 am
content: Quote from: bostonman on June 19, 2023, 12:49:06 amEw.Whilst been aware of the thread, sorry haven't been keeping up with your specifics, but selecting 'repair' on file system tools sure got my attention. Yikes.

author: bostonman
author_rank: Super Contributor
timestamp: June 19, 2023, 02:40:16 am
content: It's weird.When I had Disk Genius copied on the hard drive, it found errors, but couldn't resolve them since the software was on the hard drive. I copied it to a thumb drive, and it doesn't find any errors. When I try to move/resize the partition, it gives those errors.I can't do anything since it has these errors that it can't find when I scan for errors.

author: magic
author_rank: Super Contributor
timestamp: June 19, 2023, 05:17:19 am
content: Quote from: bostonman on June 19, 2023, 02:40:16 amRun fsck on the filesystem under Linux.

author: bostonman
author_rank: Super Contributor
timestamp: June 20, 2023, 12:58:31 am
content: QuoteThat doesn't work. It tells me something like it's already mounted on /dev/sdx or something like that.It also gives a warning that data will be lost. Either way, I'm guessing it won't run because I'm running it on the same drive Ubuntu is on.

author: SiliconWizard
author_rank: Super Contributor
timestamp: June 20, 2023, 01:31:09 am
content: To repair/repartition/resize filesystems on Linux (at least conventional filesystems like ext4), you need to work on unmounted partitions.If you want to work on the partition which is your root partition and you have no other partition to boot from, you'll need to boot from a "live" Linux, just install one on some USB key, boot from there and you'll be able to do whatever you want to your partitions.

author: RAPo
author_rank: Super Contributor
timestamp: June 20, 2023, 06:20:02 pm
content: It's difficult to help you at a distance.First, do you have a backup of the disk and partitions?Do you have a spare disk? If so, restore (for each partition in sequence) them to the spare disk and check for errors on the new disk.If no errors arise, hurray: format the original disk, restore each partition, and try to expand as you've described.If you get errors: sorry I can't help you from this distance.

author: magic
author_rank: Super Contributor
timestamp: June 21, 2023, 12:22:25 am
content: Quote from: bostonman on June 20, 2023, 12:58:31 amWait, are you also trying to run gparted the same way? Not gonna work either.Of course, gparted run from a live CD should work, if you expand sda4 before trying anything with sda5.

author: bostonman
author_rank: Super Contributor
timestamp: June 21, 2023, 02:00:42 am
content: Gparted didn't work, it was suggested to use Disk Genius (which I put on a thumb drive).The original hard drive was cloned to this brand new SSD. I'm simply trying to expand into the unallocated section since the new hard drive is bigger.

author: magic
author_rank: Super Contributor
timestamp: June 21, 2023, 08:41:41 am
content: Yes, and you need to shove sda4/sda5 all the way to the right before expanding either of sda2 or sda3.I have done similar things with gparted and see no reason why it shouldn't work.

author: bostonman
author_rank: Super Contributor
timestamp: November 08, 2023, 12:14:45 am
content: I'm resurrecting an old thread that I started as a result of a recent update.A few weeks ago I attempted to power the laptop and an error appeared stating no disk drive or whatever; basically the BIOS wasn't seeing the hard drive.Long story short, apparently the somewhat brand new SSD 500GB drive (purchased earlier this year and used maybe a total of twelve-hours) is dead.Keeping in mind this is a 32-bit laptop running Ubuntu (with a partition that has run out of space), XP, and I haven't been able to allocate the spare extra drive space that I acquired after buying this larger (now broken) hard rive) to the two operating systems.My question is: now that I'll probably buy another hard drive and copy the contents of the one prior to this broken one (thankfully I haven't added anything to the drive that the previous working drive doesn't already have), is there a way to move just the Ubuntu and XP partition over and apply the extra unallocated space to them?Keep in mind, this drive has five (?) partitions due to Dell having their two or so hidden ones (or restore partition).

author: Lindley
author_rank: Regular Contributor
timestamp: November 09, 2023, 08:58:58 pm
content: Had a similar problem where the drive was not recognised until we used the free RescueZilla ( boots on a usb stick).If you load it up, then exit the main RescueZilla page, it goes down to a page of utilities that has Gparted which did list the 'dead' drive and allow us to delete all the old partitions etc, then it reloaded Linux ok.RescueZilla does both Linux and Windows backups and cloning so it might be able to do what you want ?https://rescuezilla.com/

author: bostonman
author_rank: Super Contributor
timestamp: November 20, 2023, 04:33:10 am
content: Think I figured out how to repartition my drive using GParted (off a Thumbdrive using I think Systemrescue), however, the XP partition is giving errors.When I try to expand the XP partition (after I successfully expanded the Ubuntu partition), it states the file system has errors. I ran chkdsk using XP, left it running, returned, XP was loaded, shut down, booted GParted, tried to repartition, got the same error, tried running the error check in Systemrescue, got an error, tried booting XP to run chkdsk again, and got a .dll boot error.I don't care about the boot error or messing up the drive as I have the main drive with all the contents I need. When I screw up with GParted, I just copy the drive again.My issue is how I can get around this file system error that causes the repartition process to abort.

author: bostonman
author_rank: Super Contributor
timestamp: November 22, 2023, 05:06:17 am
content: After spending more time tinkering, I think I've figured out some things.As discussed and learned, I can't have more than four primary partitions. This drive has a 86.3MB partition, 15GB partition (Ubuntu), 90.82GB partition (WinXP), and a "media direct" that's 2.5GB; along with a 357GB unallocated (the unused portion of the new hard drive).The issue I'm experiencing: I need to delete the 2.5GB partition to give me a free partition to expand the Ubuntu and WinXP, however, when I do this, I get a .dll error when I try starting WinXP. I know this because I deleted the partition and then went to boot XP without doing anything else. If I don't delete the partition, I can run 'check' (I'm using system recovery off a thumbdrive), whereas if I delete the 2.5GB partition first, I get an error when trying to run 'check'.Now the issue is: The order of partitions is the 86MB, WinXP, Ubuntu, the 2.5GB partition, and the 357GB unused (see attached). It will not allow me to expand the Ubuntu partition into the 357GB unallocated because the 2.5GB is in the way. If I delete the 2.5GB partition, then I can expand Ubuntu (and move it towards the end leaving the proceeding section open to moving XP), but, if I delete the 2.5GB, then it causes the XP partition to give me an error when I try expanding it into the 357GB section (and no longer boot or allow System Recovery to do a 'check').I don't know why deleting a 2.5GB partition affects XP with both trying to move the partition and booting XP, but it does.My question is: how do I get around this issue?I tried allocating the 357GB partition and rebooting System Rescue thinking it will change the drive order allowing me to move Ubuntu and XP, but it didn't work.

author: BradC
author_rank: Super Contributor
timestamp: November 22, 2023, 08:32:01 am
content: Let's try this. I created a 1G loop file and partitioned it with 3 primary and 1 extended partition. We then select the extended partition and select "Resize"Expand that out to the end of the drive:Select the logical partition inside the extended partition and "Move/Resize" :Slide the partition to the end :Select the extended partition again -> Move/Resize :Grab the left hand size and slide it across to the start of the logical partition :Select the 3rd partition and move it :Select the 2nd partition and resize it :Voila :Do not try and shrink any partition, only expand.You will have to re-configure the bootloaders when you move stuff around. Testdisk is good for that. When it comes to the XP bootloader you're on your own, but I've certainly done it in the dim dark past.

author: bostonman
author_rank: Super Contributor
timestamp: November 23, 2023, 02:50:40 pm
content: I tinkered with this yesterday, but began losing track. I had to understand what a extended and logical partition was and didn't research it ahead of time; now I understand after reading.I'll try again over the weekend. From what I can tell, you're placing stuff inside the extended to make room for more partitions. After you expand the other partitions into the free space, but this messes up the bootloaders (something I don't know anything about - but have a concept of why they'd get messed up). This process would be easier if I could just move the 2.5GB partition to the opposite side of the unallocated (or at least I believe it would be easier since I have plenty of flexibility after deleting it).On mine, I don't understand what that 2.5GB partition is, however, it seems to be important enough because WinXP doesn't boot after I delete that partition; nor can I move the XP partition in System Recovery.

author: BradC
author_rank: Super Contributor
timestamp: November 24, 2023, 05:08:46 am
content: - Expand the extended partition to use all available space- Move the 2.5G partition to the end of the expanded partition- Shrink the expanded partition by nudging the start of it up against the 2.5G partition.At this point you'll have moved the unallocated space from after the extended partition, to before it.You can then move and resize the XP and Linux partitions to use that space as desired.If you're lucky then the bootloader for XP is in the primary partition and as you're going to resize it and not move it, a repair is easier should that be required. As long as you're using something newer than lilo to boot linux, it won't care where you put it.

author: bostonman
author_rank: Super Contributor
timestamp: November 24, 2023, 03:22:44 pm
content: QuoteThe only expanded is the 2.5G and that's already maximized. Did you mean the unallocated?

author: bostonman
author_rank: Super Contributor
timestamp: November 26, 2023, 12:42:16 am
content: Unless I’m doing something wrong, it won’t allow me to maximize a partition without leaving 1MB preceding and not allowing me to move/expand the precious partition.The minute I move that 2.5GB, XP doesn’t boot; I get a DLL error.

author: BradC
author_rank: Super Contributor
timestamp: November 26, 2023, 05:52:41 am
content: Quote from: bostonman on November 24, 2023, 03:22:44 pmYes.

author: bostonman
author_rank: Super Contributor
timestamp: November 27, 2023, 03:50:33 am
content: Yes, when I do this, it won't allow me to expand fully on the beginning; I need to keep 1MB. This additional unallocated space now gets in the way of trying to expand the Ubuntu partition.Update: I get a warning if I try to allocate it that it can't be -2048 or something like that.Maybe a better partition program exists that will allow me to just move partitions?

author: BradC
author_rank: Super Contributor
timestamp: November 27, 2023, 05:59:33 am
content: You seem to have expanded sdb4 and sdb5. Try expanding sdb4 and move sdb5 to the end.

author: bostonman
author_rank: Super Contributor
timestamp: November 28, 2023, 01:58:39 am
content: From what I can tell, I'm following your suggestions, but not getting the same results.I'll post pictures in a moment.