Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

linux: the choice of a GNU generation (ksh@cis.ufl.edu put this on Tshirts in '93)


computers / comp.sys.ibm.pc.hardware.storage / Re: How to shrink a partition and add space to Windows

SubjectAuthor
* How to shrink a partition and add space to Windowsbilsch01
+* Re: How to shrink a partition and add space to WindowsMarco Moock
|+* Re: How to shrink a partition and add space to Windowsbilsch01
||`- Re: How to shrink a partition and add space to WindowsMarco Moock
|`* Re: How to shrink a partition and add space to Windowsbilsch01
| `- Re: How to shrink a partition and add space to WindowsMarco Moock
`- Re: How to shrink a partition and add space to WindowsPaul

1
How to shrink a partition and add space to Windows

<ug0364$3lonb$1@dont-email.me>

 copy mid

https://www.novabbs.com/computers/article-flat.php?id=195&group=comp.sys.ibm.pc.hardware.storage#195

 copy link   Newsgroups: comp.sys.ibm.pc.hardware.storage
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: use...@writer.com (bilsch01)
Newsgroups: comp.sys.ibm.pc.hardware.storage
Subject: How to shrink a partition and add space to Windows
Date: Sun, 8 Oct 2023 22:30:26 -0700
Organization: A noiseless patient Spider
Lines: 28
Message-ID: <ug0364$3lonb$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Mon, 9 Oct 2023 05:30:45 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="d7674b2c9b103ed79dfaadb2932aefcf";
logging-data="3859179"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+9iaxFC9quiezKHIf6nUXr"
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:HYPLG8hGTKHbumM+KaoxQldopYk=
Content-Language: en-US
 by: bilsch01 - Mon, 9 Oct 2023 05:30 UTC

This PC came with Win10 on it and I added Ubuntu, including the
so-called swap partition to be used w/Ubuntu. The disk is NVME type
and uses modern GPT arrangement. I want to reduce the space used by
the Ubuntu partition and swap partition and add to Windows.

GPARTED shows the 3 big parts are physically sequential as follows:
p3 96GB: ntfs, 58 used 38 unused, no mount point shown
p6 43GB: ext4, 28 used 15 unused, mount point = /
p5 98GB: ext4, 30 used 68 unused, no mount point shown

FDISK -l output is as follows:

Device Start End Sectors Size Type
/dev/nvme0n1p1 2048 534527 532480 260M EFI System
/dev/nvme0n1p2 534528 567295 32768 16M MSoft reserved
/dev/nvme0n1p3 567296 201311502 200744207 95.7G MSoft basic data
/dev/nvme0n1p4 496840704 500117503 3276800 1.6G Win recovery env
/dev/nvme0n1p5 292040704 496840703 204800000 97.7G Linux filesystem
/dev/nvme0n1p6 201312256 292040703 90728448 43.3G Linux filesystem

QUESTION #1 is SWAP the ext4 part. shown above with mount point = /
or is it the other ext4 partition?

QUESTION #2 is there a tool that comes with Windows or Ubuntu that
can reduce size of Ubuntu and swap and add to Windows without
removing and replacing Ubuntu and swap partitions?

TIA. Bill S.

Re: How to shrink a partition and add space to Windows

<ug091t$3np9u$1@dont-email.me>

 copy mid

https://www.novabbs.com/computers/article-flat.php?id=196&group=comp.sys.ibm.pc.hardware.storage#196

 copy link   Newsgroups: comp.sys.ibm.pc.hardware.storage
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: mm+usene...@dorfdsl.de (Marco Moock)
Newsgroups: comp.sys.ibm.pc.hardware.storage
Subject: Re: How to shrink a partition and add space to Windows
Date: Mon, 9 Oct 2023 09:10:53 +0200
Organization: A noiseless patient Spider
Lines: 17
Message-ID: <ug091t$3np9u$1@dont-email.me>
References: <ug0364$3lonb$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Injection-Date: Mon, 9 Oct 2023 07:10:53 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="7a178f70ec7f34a9060f74776aac3d5a";
logging-data="3925310"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/7447ABlTd1MrP7J7OzAQh"
Cancel-Lock: sha1:UzylzLgaqmTRS0k/5rYkdam/27Y=
 by: Marco Moock - Mon, 9 Oct 2023 07:10 UTC

Am 08.10.2023 um 22:30:26 Uhr schrieb bilsch01:

> QUESTION #1 is SWAP the ext4 part. shown above with mount point = /
> or is it the other ext4 partition?

Check /etc/fstab to find the partition that is used as swap.
Current version can also use a swap file, so no separate partition is
needed.

> QUESTION #2 is there a tool that comes with Windows or Ubuntu that
> can reduce size of Ubuntu and swap and add to Windows without
> removing and replacing Ubuntu and swap partitions?

Boot a live system and use gparted to shrink the Ubuntu partitions.
To make changes to the windows partition, windows must be shut down
properly, so disable Fastboot.

Re: How to shrink a partition and add space to Windows

<ug1il7$2pmr$1@dont-email.me>

 copy mid

https://www.novabbs.com/computers/article-flat.php?id=197&group=comp.sys.ibm.pc.hardware.storage#197

 copy link   Newsgroups: comp.sys.ibm.pc.hardware.storage
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: use...@writer.com (bilsch01)
Newsgroups: comp.sys.ibm.pc.hardware.storage
Subject: Re: How to shrink a partition and add space to Windows
Date: Mon, 9 Oct 2023 12:00:34 -0700
Organization: A noiseless patient Spider
Lines: 21
Message-ID: <ug1il7$2pmr$1@dont-email.me>
References: <ug0364$3lonb$1@dont-email.me> <ug091t$3np9u$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Mon, 9 Oct 2023 19:00:56 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="13bfb7c49b91c4bf065f184f64d9cee0";
logging-data="91867"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18zgm8S/K8q5QttOX3q8Tk5"
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:gPZMNZaL2rTtWDdPN1pM+e1uTLU=
In-Reply-To: <ug091t$3np9u$1@dont-email.me>
Content-Language: en-US
 by: bilsch01 - Mon, 9 Oct 2023 19:00 UTC

On 10/9/2023 12:10 AM, Marco Moock wrote:
> Am 08.10.2023 um 22:30:26 Uhr schrieb bilsch01:
>
>> QUESTION #1 is SWAP the ext4 part. shown above with mount point = /
>> or is it the other ext4 partition?
>
> Check /etc/fstab to find the partition that is used as swap.
> Current version can also use a swap file, so no separate partition is
> needed.
>

my etc/fstab ends with mention of 'swap' as shown below, however I don't
know how to interpret it.
Does it say that character '/' represents the swap partition?

# /boot/efi was on /dev/nvme0n1p1 during installation
UUID=CEF6-AB66 /boot/efi vfat umask=0077 0 1
/swapfile none swap sw
0 0
bill:~$

Re: How to shrink a partition and add space to Windows

<ug1j3s$2q38$1@dont-email.me>

 copy mid

https://www.novabbs.com/computers/article-flat.php?id=198&group=comp.sys.ibm.pc.hardware.storage#198

 copy link   Newsgroups: comp.sys.ibm.pc.hardware.storage
Path: i2pn2.org!i2pn.org!news.hispagatos.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: use...@writer.com (bilsch01)
Newsgroups: comp.sys.ibm.pc.hardware.storage
Subject: Re: How to shrink a partition and add space to Windows
Date: Mon, 9 Oct 2023 12:08:24 -0700
Organization: A noiseless patient Spider
Lines: 12
Message-ID: <ug1j3s$2q38$1@dont-email.me>
References: <ug0364$3lonb$1@dont-email.me> <ug091t$3np9u$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Mon, 9 Oct 2023 19:08:44 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="13bfb7c49b91c4bf065f184f64d9cee0";
logging-data="92264"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19In+2s8YeJbZ+f4Bc0EFGn"
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:6VQxjHFPr98UCp1OxR9k6XGihKc=
Content-Language: en-US
In-Reply-To: <ug091t$3np9u$1@dont-email.me>
 by: bilsch01 - Mon, 9 Oct 2023 19:08 UTC

On 10/9/2023 12:10 AM, Marco Moock wrote:
> Am 08.10.2023 um 22:30:26 Uhr schrieb bilsch01:
>
>> QUESTION #1 is SWAP the ext4 part. shown above with mount point = /
>> or is it the other ext4 partition?
>
> Check /etc/fstab to find the partition that is used as swap.
> Current version can also use a swap file, so no separate partition is
> needed.
>
I should have said: when GPARTED shows mount point as '/' does that mean
that partition is the swap?

Re: How to shrink a partition and add space to Windows

<ug6q8j$1vj2p$1@dont-email.me>

 copy mid

https://www.novabbs.com/computers/article-flat.php?id=199&group=comp.sys.ibm.pc.hardware.storage#199

 copy link   Newsgroups: comp.sys.ibm.pc.hardware.storage
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: mm+usene...@dorfdsl.de (Marco Moock)
Newsgroups: comp.sys.ibm.pc.hardware.storage
Subject: Re: How to shrink a partition and add space to Windows
Date: Wed, 11 Oct 2023 20:41:23 +0200
Organization: A noiseless patient Spider
Lines: 6
Message-ID: <ug6q8j$1vj2p$1@dont-email.me>
References: <ug0364$3lonb$1@dont-email.me>
<ug091t$3np9u$1@dont-email.me>
<ug1il7$2pmr$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Injection-Date: Wed, 11 Oct 2023 18:41:23 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="3ed9b2da8afbca110567deaa273f485c";
logging-data="2083929"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18AAg+hgqBoNaV8CjZrDmg1"
Cancel-Lock: sha1:Ef6XOkM/mTK7I1o66r0xgb/XNp8=
 by: Marco Moock - Wed, 11 Oct 2023 18:41 UTC

Am 09.10.2023 um 12:00:34 Uhr schrieb bilsch01:

> /swapfile none swap sw

Then you use a swap file and not a swap partition.

Re: How to shrink a partition and add space to Windows

<ug6q9j$1vj2p$2@dont-email.me>

 copy mid

https://www.novabbs.com/computers/article-flat.php?id=200&group=comp.sys.ibm.pc.hardware.storage#200

 copy link   Newsgroups: comp.sys.ibm.pc.hardware.storage
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: mm+usene...@dorfdsl.de (Marco Moock)
Newsgroups: comp.sys.ibm.pc.hardware.storage
Subject: Re: How to shrink a partition and add space to Windows
Date: Wed, 11 Oct 2023 20:41:54 +0200
Organization: A noiseless patient Spider
Lines: 19
Message-ID: <ug6q9j$1vj2p$2@dont-email.me>
References: <ug0364$3lonb$1@dont-email.me>
<ug091t$3np9u$1@dont-email.me>
<ug1j3s$2q38$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Injection-Date: Wed, 11 Oct 2023 18:41:55 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="3ed9b2da8afbca110567deaa273f485c";
logging-data="2083929"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/ZskGj7gsh/J9SkVv3xOqc"
Cancel-Lock: sha1:zU+56LOlIEiZe0GCrq7YWLxhLnk=
 by: Marco Moock - Wed, 11 Oct 2023 18:41 UTC

Am 09.10.2023 um 12:08:24 Uhr schrieb bilsch01:

> On 10/9/2023 12:10 AM, Marco Moock wrote:
> > Am 08.10.2023 um 22:30:26 Uhr schrieb bilsch01:
> >
> >> QUESTION #1 is SWAP the ext4 part. shown above with mount point = /
> >> or is it the other ext4 partition?
> >
> > Check /etc/fstab to find the partition that is used as swap.
> > Current version can also use a swap file, so no separate partition
> > is needed.
> >
> I should have said: when GPARTED shows mount point as '/' does that
> mean that partition is the swap?

No / is never the swap partition.
You fstab shows it and it is a swapfile directly on the root partition
(/).

Re: How to shrink a partition and add space to Windows

<ug83t4$2bqh6$1@dont-email.me>

 copy mid

https://www.novabbs.com/computers/article-flat.php?id=203&group=comp.sys.ibm.pc.hardware.storage#203

 copy link   Newsgroups: comp.sys.ibm.pc.hardware.storage
Path: i2pn2.org!rocksolid2!news.neodome.net!news.mixmin.net!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: nos...@needed.invalid (Paul)
Newsgroups: comp.sys.ibm.pc.hardware.storage
Subject: Re: How to shrink a partition and add space to Windows
Date: Thu, 12 Oct 2023 02:32:03 -0400
Organization: A noiseless patient Spider
Lines: 101
Message-ID: <ug83t4$2bqh6$1@dont-email.me>
References: <ug0364$3lonb$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
Injection-Date: Thu, 12 Oct 2023 06:32:04 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="93e3b8c33bd810facbcc79d000f64332";
logging-data="2484774"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/zpJzaaxqGDYALtsArAW//+3R5IymhEIE="
User-Agent: Ratcatcher/2.0.0.25 (Windows/20130802)
Cancel-Lock: sha1:GPpccs6hZrka8tzt+FBNlSKvDUU=
Content-Language: en-US
In-Reply-To: <ug0364$3lonb$1@dont-email.me>
 by: Paul - Thu, 12 Oct 2023 06:32 UTC

On 10/9/2023 1:30 AM, bilsch01 wrote:
> This PC came with Win10 on it and I added Ubuntu, including the
> so-called swap partition to be used w/Ubuntu. The disk is NVME type
> and uses modern GPT arrangement.  I want to reduce the space used by
> the Ubuntu partition and swap partition and add to Windows.
>
> GPARTED shows the 3 big parts are physically sequential as follows:
> p3  96GB: ntfs, 58 used  38 unused, no mount point shown
> p6  43GB: ext4, 28 used  15 unused, mount point = /
> p5  98GB: ext4, 30 used  68 unused, no mount point shown
>
> FDISK -l output is as follows:
>
> Device             Start       End   Sectors  Size Type
> /dev/nvme0n1p1      2048    534527    532480  260M EFI System <=== FAT for EFI (boot, Ubuntu folder, Windows folder)
> /dev/nvme0n1p2    534528    567295     32768   16M MSoft reserved <=== NO FILESYSTEM IS PRESENT (sixteen megabytes)
> /dev/nvme0n1p3    567296 201311502 200744207 95.7G MSoft basic data <=== NTFS 0x07 Win10
> /dev/nvme0n1p4 496840704 500117503   3276800  1.6G Win recovery env <=== NTFS 0x27 Unmounted System Reserved MSoft ??? Size ?
> /dev/nvme0n1p5 292040704 496840703 204800000 97.7G Linux filesystem
> /dev/nvme0n1p6 201312256 292040703  90728448 43.3G Linux filesystem
>
> QUESTION #1 is SWAP the ext4 part. shown above with mount point = /
> or is it the other ext4 partition?
>
> QUESTION #2 is there a tool that comes with Windows or Ubuntu that
> can reduce size of Ubuntu and swap and add to Windows without
> removing and replacing Ubuntu and swap partitions?
>
> TIA.    Bill S.

My favorite tool, for making a Windows-Disk-Management like display,
is gnome-disks. That's the graphical way.

[Picture[

https://i.postimg.cc/gc43dgn3/gnome-disks-aka-palimpset.gif

For a file system summary, you can...

sudo apt install disktype
sudo disktype /dev/sda

For disk resize/move, that would be sudo gparted /dev/sda

[Picture]

https://i.postimg.cc/GhxDzq14/sudo-gparted-for-resize-move.gif

On Windows, Paragon Partition Manager 14 Free, can do about as well
as GParted can do. This is the detail on my copy acquired years ago.

Name: pm14free_x64_eng.exe
Size: 53,091,632 bytes (50 MiB)
SHA256: 7F48097AC70AE6B27FCC5C40A10BBE7E42516DC7D73D0C48ABFFE1D50B2145CF

Potential source:

https://www.majorgeeks.com/files/details/paragon_partition_manager_express_free_edition.html

Windows itself, Disk Management can "shrink" or "extend" an NTFS partition,
but it cannot "move" the partition.

Disk Management, the NTFS Shrink is to 50% of original size (max shrink)
due to an inability to move some metadata located at 50% location.
With the right defragmenter, the metadata can be moved, and then
the Windows Shrink used again, but this is... silly, when Paragon
will do whatever you want, in one shot. Some Paragon operations
require a reboot, so the partition is offline.

Your Linux swap is likely set at 1.5x the system RAM. If you wanted
hibernation support, there could be some research to do. If
you don't need hibernation for Linux, you can drop the swap to
a token amount (1GB). In my first picture above, my swap is 1GB,
on a computer with 64GB of RAM. Modern computers generally have
enough RAM, that you don't really need a lot of swap. There are
still some super-cheap PCs for sale, and the manufacturers
have to work damn hard, to make small RAM for them. 8GB sticks
of RAM are readily available, as are 16GB sticks. You can also get
32GB sticks (DDR4 for example). Older computers, 2GB sticks were
more characteristic materials for them.

If you mess with swap, record the BLKID for later usage. Normally,
/etc/fstab also has "notes" about swap. After GParted is finished
messing with swap, you may need to correct the ID on the partition.
To modify swap, I would expect gparted would have to do a
"swapoff" so the swap can be modified. I don't know if I've ever
tried to shrink a swap, so good luck with that :-)

As for the "safety aspect" of gparted, it is pretty good for most
things. However, it absolutely destroyed an old mac disk setup.
The program said "yes, yes, I grok this". And when I asked it
to do a simple manipulation, the partition table was destroyed.
I looked at it with a hex editor, and I couldn't even see a
pattern to the damage :-/ Thus, as a user, use common sense with
that thing. Linux and Windows. No problem. Obscure disk type.
Take precautions. When the mac disk was destroyed, I had a backup.
Lucky, eh. I feel I was pretty lucky that day.

Paul

1
server_pubkey.txt

rocksolid light 0.9.7
clearnet tor