Option to shrink Windows partition

Technical issues/questions of an intermediate or advanced nature.
Stefan
White ninja
White ninja
Posts: 12
Joined: 08 Feb 2016, 14:32
Distribution: Kiosk
Location: Germany

Option to shrink Windows partition

Post#1 by Stefan » 22 Sep 2021, 11:12

I have installed several of these MiniPCs with Porteus by now and one thing that bugs me is, that you get a virgin MiniPC with a Win10 install/license and just delete that.
An option for shrinking the WIN partition, making room for the rather tiny Porteus install would be awesome.

Or is there any technical reason that this is a bad idea?

Also a 2nd option for reverting back to "virgin" would be double great, in case any of the hardware features aren't aligned with Porteus, one could at least use the WIN part of the little fella…

User avatar
Ed_P
Contributor
Contributor
Posts: 8341
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 5.01 ISO
Location: Western NY, USA

Option to shrink Windows partition

Post#2 by Ed_P » 22 Sep 2021, 15:04

With Porteus you can use GParted to shrink the Windows' partition. It's in Porteus' Admin menu. Another approach would be to expand the UEFI partition and install Porteus there.
Ed

nanZor
Shogun
Shogun
Posts: 381
Joined: 09 Apr 2019, 03:27
Distribution: Porteus 5.01 x86-64 LXQT

Option to shrink Windows partition

Post#3 by nanZor » 03 Nov 2021, 22:17

Stefan - your quest might be more easily handled on a mini-pc by remembering that Porteus' namesake is to be portable, and not have to touch or rely on installing to the internal drive at all, however convenient that may be. But I know, it's kind of hard to lose that "install to the hard drive" mentality.

I put Porteus on many mini-pc's, and it makes an excellent choice for that. But I do have some cautions in regards to the internal drives and other comments.

As you've seen most of these mini-pc's come with some form of Windows (usually ver 8 - 10) on them. The internal emmc's usually have multiple partitions, which include restorations partitions in case you blow it and need to restore. You can blow those away certainly to make more room for Porteus, but sometimes they don't exist at the end, but at the beginning. Of course that means no restoration.

The bigger issue is that some of them have "reserved partitions" hardcoded into the drives. If you get overzealous with gparted, and blow them away, they may not actually go away. All that will happen is that you have removed their partition table, but being reserved, they live on as ghosts as "unrecognized partitions" when using Porteus (or any other linux distro), that may present problems to the system trying to set up their fstab with the empty ghost-partitions constantly presenting problems. It all depends on how the system handles basically empty unrecognizable partitions with no internal tables of their own.

Essentially a better plan might be to not rely or use the internal drive at all. Create a bootable Porteus usb (or sd/micro sd) bootable stick. You may want to even point your savefile.dat to the boot stick for an all in one. OR, perhaps use *another* stick as your data drive to hold a savefile.dat so you don't wear out the boot stick. You are simply avoiding the internal drive. Which if you think about portability - say visiting your friends place - who may allow you to use her computer with Porteus, but does NOT want you putting anything of your own on it - this type of operation works.

Which of course answers your second need - to not worry about mucking about with your existing windows setup on the cheap internal drive. Here's a big tip - most of these mini-pc's come with either valid or bogus windows installs, and a couple hours after installation they try to update. You know what happens. Unless you absolutely need the latest updates for security and the like, an easy way to freeze the existing setup is to use StopUpates10. (works on 7/8/10).

So there you go. My .02c anyway. Porteus excels for this, but I tend to use Porteus' flexibility to avoid the internal drive altogether. Quality storage is so cheap these days, and with the mini-pc's having a plethora of usable ports, one can avoid all that trouble unless they absolutely have to.
That's a UNIX book - cool. -Garth

nanZor
Shogun
Shogun
Posts: 381
Joined: 09 Apr 2019, 03:27
Distribution: Porteus 5.01 x86-64 LXQT

Option to shrink Windows partition

Post#4 by nanZor » 04 Nov 2021, 22:41

Forgot:

"So if these ghost partitions are a problem if you go nuts with deleting everything with gparted, why not just reformat and partion it?"

There's a deadly catch! If you go ahead and brute force a deletion with gparted on a windows "reserved partition" on the on-board emmc device, you can't write to it later! Many are "read-only" meaning you can delete it, but you can't reformat it later after you do that. Now you are left with a stupid empty partition which udev or whatever has to barf on every time you boot.

The moral is, sure you can find a nook or cranny to put Porteus into on the internal device if you want to. But be careful if you are thinking about "cleansing" it completely.

Ultimately, this is why a simple "Wipe the windows partition(s)" option in Porteus may not actually be a good idea from a total automation standpoint.
That's a UNIX book - cool. -Garth

User avatar
Rava
Contributor
Contributor
Posts: 5401
Joined: 11 Jan 2011, 02:46
Distribution: XFCE 5.01 x86_64 + 4.0 i586
Location: Forests of Germany

Option to shrink Windows partition

Post#5 by Rava » 05 Nov 2021, 01:40

nanZor wrote:
03 Nov 2021, 22:17
The bigger issue is that some of them have "reserved partitions" hardcoded into the drives. If you get overzealous with gparted, and blow them away, they may not actually go away. All that will happen is that you have removed their partition table, but being reserved, they live on as ghosts as "unrecognized partitions" when using Porteus (or any other linux distro), that may present problems to the system trying to set up their fstab with the empty ghost-partitions constantly presenting problems. It all depends on how the system handles basically empty unrecognizable partitions with no internal tables of their own.
Is there a way to determine if such hardcoded "reserved partitions" exist?
Or is the only chance in asking in mini-pc forums if others realized after using e.g. gparted that the partitions just morphed into now unusable "unrecognized ghost partitions"?
Cheers!
Yours Rava

nanZor
Shogun
Shogun
Posts: 381
Joined: 09 Apr 2019, 03:27
Distribution: Porteus 5.01 x86-64 LXQT

Option to shrink Windows partition

Post#6 by nanZor » 05 Nov 2021, 09:04

It's easy to see - gparted will have a yellow caution triangle in front of the "Microsoft Reserved Partition". Don't mess with it.

But that didn't stop me. :)

Thing is, at least with RC3, the gparted version won't see that onboard emmc device anyway. But SpaceFM surely does!

So I figured I'd just burn and load the latest Gparted-live iso and hammer it somehow to get it recognized so it could actually be deleted somehow by tricking it by changing flags, and doing other unscientific atrocities to it.

Gparted does give you this warning along with the yellow warning triangle:

Code: Select all

WARNING
Unable to detect filesystem!  Possible reasons:
- The file system is damaged
- The file system is unknown to Gparted
- There is no file system available (unformatted)
- The device entry /dev/mmcblk1p2 is missing.
So just don't waste time like I did doing everything gparted suggested was wrong to fix it - to make that yellow caution triangle on the partition disappear. It won't go away. :)
Last edited by nanZor on 05 Nov 2021, 09:09, edited 1 time in total.
That's a UNIX book - cool. -Garth

User avatar
Rava
Contributor
Contributor
Posts: 5401
Joined: 11 Jan 2011, 02:46
Distribution: XFCE 5.01 x86_64 + 4.0 i586
Location: Forests of Germany

Option to shrink Windows partition

Post#7 by Rava » 05 Nov 2021, 09:07

nanZor wrote:
05 Nov 2021, 09:04
So I figured I'd just burn and load the latest Gparted-live iso and hammer it somehow to get it recognized so it could actually be deleted somehow by tricking it by changing flags, and doing other unscientific atrocities to it.
In the end was it a success or was it a failure and all your efforts resulted in an unusable area of the hard disc?

Hmmm doing unscientific atrocities to a Microsoft protected area, that sounds appealing. :D
Cheers!
Yours Rava

nanZor
Shogun
Shogun
Posts: 381
Joined: 09 Apr 2019, 03:27
Distribution: Porteus 5.01 x86-64 LXQT

Option to shrink Windows partition

Post#8 by nanZor » 05 Nov 2021, 09:46

Well, I was on a total-cleanse mission. After the atrocities to that reserved partition I tried to do, I noticed that on another system I run, it seems to make udevd angry, and it puts it's error messages into the first start of the boot process.

So I learned to just leave it alone. My latest box, a BMAX B1 Plus fanless - I'm not touching it.

But yes, instead of a total cleanse, I did simply shrink the normal user-data partition of windows by 2gb or so to put a new little partition for my Porteus savefile.dat on it. But meh, I still prefer to use hot-pluggable sticks for my data.
That's a UNIX book - cool. -Garth

User avatar
Rava
Contributor
Contributor
Posts: 5401
Joined: 11 Jan 2011, 02:46
Distribution: XFCE 5.01 x86_64 + 4.0 i586
Location: Forests of Germany

Option to shrink Windows partition

Post#9 by Rava » 05 Nov 2021, 16:44

nanZor wrote:
05 Nov 2021, 09:46
instead of a total cleanse, I did simply shrink the normal user-data partition of windows by 2gb or so to put a new little partition for my Porteus savefile.dat on it.
so shrinking the normal user-data partition of windows is still a safe bet. Good to know.
Cheers!
Yours Rava

nanZor
Shogun
Shogun
Posts: 381
Joined: 09 Apr 2019, 03:27
Distribution: Porteus 5.01 x86-64 LXQT

Option to shrink Windows partition

Post#10 by nanZor » 05 Nov 2021, 21:51

Yep - the usual rules apply if you want to shrink it the max. Get rid of all the bloat first since the emmc's can be pretty tiny to begin with. All the usual windows rituals. Or, avoid all that nonsense and run from an external device. :)
That's a UNIX book - cool. -Garth

User avatar
Rava
Contributor
Contributor
Posts: 5401
Joined: 11 Jan 2011, 02:46
Distribution: XFCE 5.01 x86_64 + 4.0 i586
Location: Forests of Germany

Option to shrink Windows partition

Post#11 by Rava » 06 Nov 2021, 04:54

nanZor wrote:
05 Nov 2021, 21:51
avoid all that nonsense and run from an external device.
that has the advantage, if you happen to have a 2nd or 3rd identical hardware you can just use your custom working usb thumbdrive or sdhc card for all machines.
Cheers!
Yours Rava

User avatar
Ed_P
Contributor
Contributor
Posts: 8341
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 5.01 ISO
Location: Western NY, USA

Option to shrink Windows partition

Post#12 by Ed_P » 06 Nov 2021, 19:37

I shrink all my Windows' OS partitions when I get new pcs/notebooks to create Data and BackUp partitions on the drives. No problems booting Windows after doing that with UEFI or BIOS based systems.
Ed

nanZor
Shogun
Shogun
Posts: 381
Joined: 09 Apr 2019, 03:27
Distribution: Porteus 5.01 x86-64 LXQT

Option to shrink Windows partition

Post#13 by nanZor » 06 Nov 2021, 19:53

Certainly. Just remember that all it takes is one windows-update on one of the smaller emmc's like 16gb to not have much to shrink afterwards! :) And be more or less unusable. That's why I put a freeze on those with simple utils like StopUpdates10. There are other methods.

But that's the beauty of Porteus. It can handle nearly all situations in one way or the other.
That's a UNIX book - cool. -Garth

User avatar
Rava
Contributor
Contributor
Posts: 5401
Joined: 11 Jan 2011, 02:46
Distribution: XFCE 5.01 x86_64 + 4.0 i586
Location: Forests of Germany

Option to shrink Windows partition

Post#14 by Rava » 07 Nov 2021, 07:50

nanZor wrote:
06 Nov 2021, 19:53
But that's the beauty of Porteus. It can handle nearly all situations in one way or the other.
The most time money and nerves saving method - especially seen months and years into the future - is to wipe all witless partitions but the "Microsoft Reserved Partition"… and install Porteus and FreeBSD and whatnot instead. B)

Update
For more details look here: Option to shrink Windows partition (Post by Rava #85396)
Please follow my tips on what to have as alternative OSes on your internal drive, and also what to have as external rescue systems, all tested individually prior wiping WIndoze.
Cheers!
Yours Rava

User avatar
Ed_P
Contributor
Contributor
Posts: 8341
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 5.01 ISO
Location: Western NY, USA

Option to shrink Windows partition

Post#15 by Ed_P » 07 Nov 2021, 18:14

Rava wrote:
07 Nov 2021, 07:50
The most time money and nerves saving method - especially seen months and years into the future - is to wipe all witless partitions but the "Microsoft Reserved Partition"… and install Porteus and FreeBSD and whatnot instead.
We have users who have difficulties creating bootable Porteus USB drives and you think having them wipe their hard drives but not their Reserved Partition will save time and money!!! :o I don't think so. :thumbdown:
Ed

Post Reply