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

 

 

 

Temporary Deleting Partition?

Off-Topic discussions about science, technology, and non Debian specific topics.
Message
Author
User avatar
bester69
Posts: 2072
Joined: 2015-04-02 13:15
Has thanked: 24 times
Been thanked: 14 times

Re: Temporary Deleting Partition?

#16 Post by bester69 »

This disk is currently in use - it is not advisable to recreate partitions. Unmount all file systems and undo all the sharing partitions on this disk. use the --no-reread indicator to eliminate this check.
Is there much risks by commiting in live session??, I already did it, but i'd like to know for the next one. :mrgreen:
sudo sfdisk /dev/sda < sda.ptbl --no-reread
failure to read the partition table again .: device or resource occupied the kernel still uses the old table. the new table will be used at the next restart or after you execute partprobe (8) or kpartx (8).
I executed partprobe to load the new table, and everything seems ok.
Last edited by bester69 on 2017-11-07 14:15, edited 1 time in total.
bester69 wrote:STOP 2030 globalists demons, keep the fight for humanity freedom against NWO...

User avatar
bester69
Posts: 2072
Joined: 2015-04-02 13:15
Has thanked: 24 times
Been thanked: 14 times

Re: Temporary Deleting Partition?

#17 Post by bester69 »

sfdisk WORKS like a charm!!!

I did it with success, I didnt see mayor risks in using sfdisk in live session, I did many tests, and kernel didnt explode in the way, so my conclusion is THIS IS a GREAT procedure!! I will document it for myself, We can use this workaround to bypass a temporary 4 partitions limitation.

The only care i see we must take, is not to overlap the "deleted partition" with the "temporary new one", So i'd recommend to leave a gap of 1Gb between both adjacent partitions.

As for me, Its a fixed case. :D

Thanks to all, for your help.
bester69 wrote:STOP 2030 globalists demons, keep the fight for humanity freedom against NWO...

p.H
Global Moderator
Global Moderator
Posts: 3049
Joined: 2017-09-17 07:12
Has thanked: 5 times
Been thanked: 132 times

Re: Temporary Deleting Partition?

#18 Post by p.H »

wizard10000 wrote:You could also do it with dd
Yes in the specific case of this thread because you only touch the primary partition table which is stored in the MBR.

But not in the general case if you touch a logical partition. Each logical partition entry is in a separate extended partition table stored in a different sector, the first one being the EBR at the beginning of the extended partition. So with dd you would need to save the MBR and all these sectors (after determining their positions, which is not trivial).
bester69 wrote:We can use this workaround to bypass a temporary 4 partitions limitation.
By the way, may I ask why you need a primary partition and not a logical partition ?

PS : I just remembered that recent fdisk has interactive commands to save/restore the partition layout with the same format as sfdisk.

User avatar
bester69
Posts: 2072
Joined: 2015-04-02 13:15
Has thanked: 24 times
Been thanked: 14 times

Re: Temporary Deleting Partition?

#19 Post by bester69 »

p.H wrote:...
By the way, may I ask why you need a primary partition and not a logical partition ?

PS : I just remembered that recent fdisk has interactive commands to save/restore the partition layout with the same format as sfdisk.
I dont have enought free space in my hard disk, so i have to play with additional partitions, The extended partition is well defined as you can see in the picture, and everytime i wanted to install something I needed to use the extended partition to create a logic one,. Now thanks to your help, i can make use of the windows partition (sda1), to make free temporary space for a testing installation., or i could use free space of sda2 (system installation) to use it for a testing installation as I can delete sda1 for a while and bright it back eventually. Its really great!!, I was missing this workaround for long, ill write it down in my personal How-book.

Thanks, p.H. :wink:
bester69 wrote:STOP 2030 globalists demons, keep the fight for humanity freedom against NWO...

andre@home
Posts: 398
Joined: 2011-10-02 08:00

Re: Temporary Deleting Partition?

#20 Post by andre@home »

Taking a temporally (cheap) disk would have been a lot more comfortable.
The limits of only 4 partitions is a very known issue, and if you wanna go beyond that limit you need partition manager that can handle that.
Even if you do know that on before that, I would advise not to use that route, as any change of partions is a risk of loosing data.
So whatever you you ... you will need that extra disk anyhow. So the workaround seems a more theoretical and not a very practical route to be advised. I hope you saved all your data from your disk that you wanna change on at least 1 preferably 2 backups disks. Else you're playing with fire... "
and we might have expected a new question from you...: "Help I lost my data while I tried to delete and later recover a partition....
You were lucky..... all went ok...

User avatar
bester69
Posts: 2072
Joined: 2015-04-02 13:15
Has thanked: 24 times
Been thanked: 14 times

Re: Temporary Deleting Partition?

#21 Post by bester69 »

andre@home wrote:Taking a temporally (cheap) disk would have been a lot more comfortable.
The limits of only 4 partitions is a very known issue, and if you wanna go beyond that limit you need partition manager that can handle that.
Even if you do know that on before that, I would advise not to use that route, as any change of partions is a risk of loosing data.
So whatever you you ... you will need that extra disk anyhow. So the workaround seems a more theoretical and not a very practical route to be advised. I hope you saved all your data from your disk that you wanna change on at least 1 preferably 2 backups disks. Else you're playing with fire... "
and we might have expected a new question from you...: "Help I lost my data while I tried to delete and later recover a partition....
You were lucky..... all went ok...
Thanks, but I can manage my own risks, i usually like to take them, other way you wont never advantge in kowledges.. I have all that i need in several redundant backups in clouds.
The workaround proposed by P.H. works as a charm and its trustworthy and very easy to apply. It cant failt never, its only a writting the table partition, so unless you overlap data, you cant get yourself in a mess. I proposed to let unless 1Gb of gap to not overlapping data accidentally, this is whole risk.
bester69 wrote:STOP 2030 globalists demons, keep the fight for humanity freedom against NWO...

User avatar
pylkko
Posts: 1802
Joined: 2014-11-06 19:02

Re: Temporary Deleting Partition?

#22 Post by pylkko »

Another, not-so-directly-related-to-the-issue question is: why are you not using GPT?

p.H
Global Moderator
Global Moderator
Posts: 3049
Joined: 2017-09-17 07:12
Has thanked: 5 times
Been thanked: 132 times

Re: Temporary Deleting Partition?

#23 Post by p.H »

pylkko wrote:why are you not using GPT?
The current partition table gives the answer to that question : because Windows is installed in BIOS/legacy mode on this drive, which requires MSDOS partitioning.
Using GPT would require to reinstall Windows in EFI mode, assuming the machine is UEFI-capable.

A workaround is to create a "hybrid MBR" combining both an old-style MSDOS partition table for Windows and a new-style GPT partition table for GNU/Linux. I have tested it and it works, but it is an ugly and unreliable hack.

User avatar
pylkko
Posts: 1802
Joined: 2014-11-06 19:02

Re: Temporary Deleting Partition?

#24 Post by pylkko »

Okay, I see. I was wondering because I have installed Debian on almost exactly that hardware/BIOS (Acer Extensa) version using GPT without issue. I suppose reinstalling Windows is not the simplest thing either.

andre@home
Posts: 398
Joined: 2011-10-02 08:00

Re: Temporary Deleting Partition?

#25 Post by andre@home »

Starting from ~3TB you must use a GPT table, below that you have a choice.

andre@home
Posts: 398
Joined: 2011-10-02 08:00

Re: Temporary Deleting Partition?

#26 Post by andre@home »

bester69 wrote:Thanks, but I can manage my own risks, i usually like to take them, other way you wont never advantge in kowledges.. I have all that i need in several redundant backups in clouds..
OK !
It cant failt never, its only a writting the table partition, so unless you overlap data, you cant get yourself in a mess. I proposed to let unless 1Gb of gap to not overlapping data accidentally, this is whole risk.
Never say never... :mrgreen:
And
"It cant failt never"
is a so called "double ignorance"... I believe (I'm not native English).... so it actually means:
it can fail.... :lol:

p.H
Global Moderator
Global Moderator
Posts: 3049
Joined: 2017-09-17 07:12
Has thanked: 5 times
Been thanked: 132 times

Re: Temporary Deleting Partition?

#27 Post by p.H »

andre@home wrote:Starting from ~3TB you must use a GPT table
Above 2 TiB (~2.2 TB). Not quite near 3 TB.
Also note that a partition table is not mandatory.
andre@home wrote:below that you have a choice.
Not always.
If you have Windows and BIOS, you must use MSDOS.
If you have Windows and UEFI, you must use GPT.

Post Reply