LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-05-2021, 01:27 PM   #16
computersavvy
Senior Member
 
Registered: Aug 2016
Posts: 3,345

Rep: Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484

Quote:
Originally Posted by Ana Hartley View Post
My dual boot windows c: has only 2 Gb left and no unallocated space nextdoor parttn. Disk mgt C: has 'extend volume' greyed out obv. Sorry newbie mistake i did query for similar threads but thought to check with u guys first as would hate to lose possibly Ubuntu exten parttn nextdoor to it(to right)... Ubuntu installer created (the previously massive, empty parttn i created nextdoor) this parttn as a container for its extended parttns for itself to be in. It (this nextdoor parttn) is 200 GB, i mistakenly made it massive, and with nothing else on it,prior to Ubuntu installtn. df -L shows it as just havg dos/mbr reference at top, with "bootstrap BOOTMGR" at bottom(assume all exten. parttns have this in them?).Just ntfs, otherwise empty. Shall i go ahead & use third party parttning software? As per, the only unallocated space is end of disk, linux's friendly 1.1Mb. No other unallocated anywhere, total newbie bloop!
If I understand your quandry, you are saying that you shrank the windows partition too small and now need more space there but because the space immediately following is in use windows cannot extend the partition to give more room.

I suggest you use gparted in the linux system and resize & relocate the linux partitions to give you the space needed immediately following the windows partition so the windows can be resized. Gparted can handle that as long as you boot from live USB to do so. It cannot be done when trying to move the partition with a file system in use.

EDIT
Reviewing what you have posted again, I now see that you are using an msdos partitioned drive and that windows is up against the extended partition.
With that issue gparted may not be able to help right off.
I now suggest that you use either a second internal drive or an external drive and relocate the linux install entirely to the new drive. This then would allow a complete removal of the extended partition and its content so windows may be extended. Doing so might require a complete reinstall of the linux OS so doing a backup of your data before starting is highly recommended

Last edited by computersavvy; 05-05-2021 at 01:36 PM.
 
Old 05-05-2021, 03:00 PM   #17
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,568

Rep: Reputation: 2499Reputation: 2499Reputation: 2499Reputation: 2499Reputation: 2499Reputation: 2499Reputation: 2499Reputation: 2499Reputation: 2499Reputation: 2499Reputation: 2499
In post 11, the OP has copied the output of a command suggested earlier and it shows sda5 as a 190+GB windows ntfs partition. If this is the partition the OP states was created for Ubuntu, it's obvious why a new partition. Linux systems won't install or work on an tfs filesystem. It may or may not be empty as nothing the OP posted shows that but if it is empty, problem solved. Just use that partition to move data from the primary windows partition.

In that same post the OP posted the size of the sda1 and sda2 ntfs partitions which amounted to little over 3GB. Wrong size copied, can't put a full windows install on that. The out put of the df -T command in post 3 shows sda2 as massively larger than 2GB and this appears to be the windows drive which is full (96%).

Last edited by yancek; 05-05-2021 at 03:22 PM.
 
1 members found this post helpful.
Old 05-05-2021, 04:24 PM   #18
quickbreakfast
Member
 
Registered: Oct 2015
Location: northern territory
Distribution: slackware 15
Posts: 338

Rep: Reputation: Disabled
Quote:
Originally Posted by Ana Hartley View Post
Is there anything i should know when partitioning re needs for unallocated space between partitions(after os i assume?).
Not knowing what you already know, I don't know what to tell you you should know.

Quote:
Also, the linux installer missed my big partition i created for it
If the computer missed a partition you intended for your linux install, I'm willing to bet you aimed the install at a different partition.

Follow the advice of michaelk, (post number 15) he knows a lot more than me.

By the way. I tried to send you a message, but your end blocked it. The message said I maybe in Sydney on May 15th (lockdowns permitting). If you still need help, I could be available on the 16th or 17th.

Last edited by quickbreakfast; 05-05-2021 at 04:25 PM.
 
1 members found this post helpful.
Old 05-05-2021, 06:23 PM   #19
cyno77
Member
 
Registered: Mar 2021
Location: Sydney, Australia
Distribution: Ubuntu Linux
Posts: 47

Original Poster
Rep: Reputation: Disabled
Thanks Michaelk. So you're saying I don't need a home partition?

Also, where you say,"move sda3 to the right" for creating unallocated space, do I just shrink it's partition then? Wouldn't that create unllocated space to it's right not left? Sorry I'm into python coding and networking at uni, never done much resizing partitions before, just formatting. Actually, any links re: partitioning, would help as they all seem to give command lists but not tell you pitfalls and what u should be aiming for, like unallocated space between every partition?

Here is the fdisk -l everyone has been asking for. I never could tell how to read what a loop is, in relation to a partition, but I'm sure I'll figure it out? :O Sorry it's so long, yr bloody nginx backend always tells me my single photo is too large for me to upload a.jpg photoinstead!

Disk /dev/loop0: 9.7 MiB, 9510912 bytes, 18576 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop1: 99.22 MiB, 104030208 bytes, 203184 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop2: 9.9 MiB, 9531392 bytes, 18616 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop3: 99.15 MiB, 103964672 bytes, 203056 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop4: 55.46 MiB, 58142720 bytes, 113560 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop5: 65.1 MiB, 68259840 bytes, 133320 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop6: 49.8 MiB, 52203520 bytes, 101960 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop7: 55.48 MiB, 58159104 bytes, 113592 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/sda: 465.78 GiB, 500107862016 bytes, 976773168 sectors
Disk model: HGST HTS725050A7
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0x1f355925

Device Boot Start End Sectors Size Id Type
/dev/sda1 * 2048 3074047 3072000 1.5G 7 HPFS/NTFS/exFAT
/dev/sda2 3074048 123086847 120012800 57.2G 7 HPFS/NTFS/exFAT
/dev/sda3 123088894 946825215 823736322 392.8G f W95 Ext'd (LBA)
/dev/sda4 946825216 976771071 29945856 14.3G 7 HPFS/NTFS/exFAT
/dev/sda5 123088896 537225215 414136320 197.5G 7 HPFS/NTFS/exFAT
/dev/sda6 537227264 946825215 409597952 195.3G 83 Linux

Partition 3 does not start on physical sector boundary.
Partition table entries are not in disk order.


Disk /dev/loop8: 51.4 MiB, 53522432 bytes, 104536 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop9: 217.92 MiB, 228478976 bytes, 446248 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop10: 32.28 MiB, 33841152 bytes, 66096 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop11: 64.79 MiB, 67915776 bytes, 132648 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop12: 32.28 MiB, 33841152 bytes, 66096 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop13: 218.102 MiB, 229629952 bytes, 448496 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Can I use Ubuntu Live Installer USB (i created w Rufus, it loads trial Ubuntu then installer activates) by bios to appraise/enumerate internal disk and wipe it?
 
Old 05-05-2021, 06:54 PM   #20
quickbreakfast
Member
 
Registered: Oct 2015
Location: northern territory
Distribution: slackware 15
Posts: 338

Rep: Reputation: Disabled
Quote:
Originally Posted by Ana Hartley View Post
Thanks Michaelk. So you're saying I don't need a home partition?
I have a /home folder that is NEVER used....... well not by me...... It has a number of hidden files that the OS appears to need.

Instead my data goes on a separate partition called /larissa.

Here are two links I found on google about resizing partitions.

https://www.howtogeek.com/114503/how...tu-partitions/ and

https://www.howtoforge.com/partitioning_with_gparted

I use to head for howtogeek.com to search for info, but it has recently required that you sign up for a newletter. So I've stopped using it for reference.

Quote:
Can I use Ubuntu Live Installer USB (i created w Rufus, it loads trial Ubuntu then installer activates) by bios to appraise/enumerate internal disk and wipe it?
Even if it means doing another download, I'd suggest using a live usb from your distro. Particularly if you can not remain in the live environment.

If you decide to download again. don't forget to corruption check your download with md5sum. And create the iso with dd (dd has a man page).
 
Old 05-05-2021, 07:58 PM   #21
cyno77
Member
 
Registered: Mar 2021
Location: Sydney, Australia
Distribution: Ubuntu Linux
Posts: 47

Original Poster
Rep: Reputation: Disabled
Thanks for the links & advice. I will get another LiveUsb from distro.

Yancek I looked in my Win7 Disk MGT &it truly said, in Properties, that
System partition = 350 Mb used. 1.6Gbtotal

Win7 partition = 55.1Gb used. 61Gb totalsiz

So SysDrive Win IS really Wierdly small on Disk MGT.
Dunno about df -t, what that shows, U say it represents as bigger? I hope that IS the Win parttn in DF -t you are referring to! It's hard to tell. We assumed sda1 & sda2!

Thank-you all.

Last edited by cyno77; 05-07-2021 at 11:44 PM.
 
Old 05-05-2021, 08:37 PM   #22
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,783

Rep: Reputation: 5936Reputation: 5936Reputation: 5936Reputation: 5936Reputation: 5936Reputation: 5936Reputation: 5936Reputation: 5936Reputation: 5936Reputation: 5936Reputation: 5936
In physical order of how the drive is partitioned and as I understand what you have posted.

sda1 is the system partition and is hidden. Windows versions 7+ have a separate system and boot partitions.

sda2 is the where Windows 7 is installed and this is the C: drive.

sda3 as explained earlier is the extended partition. Basically a container for logical partitions sda5 and sda6. An extended partition was created many many years ago to overcome the original limitation of only 4 primary partitions. This is called legacy or MSDOS Master Boot Record (MBR). Newer systems use GPT partitioned disks which is over and beyond the current discussion.

sda4 is probably the recovery partition. Instead of physical optical disks the system is saved to this partition and there is usually a utility to create physical media of some sort. You should be also able to restore the computer back to its original condition as first purchased using this partition.

When you resized the c: drive to create another partition the extended partition i.e. sda3 and sda5 were automatically created. The Ubuntu installer automatically resized d: and created sda6 which is where your Ubuntu is installed.

Since the spare space resides within the extended partition to create unallocated space to add to your sda2 requires you to shrink or delete sda5 it if is truly unused. Move sda6 to the left so it starts at the beginning of sda3 and then shrink sda3 it self.

To create unallocated space for sda2 you need to move sda3 to the right so it "sits" next to sda4. Then resize sda2 to include the empty space.

As a side affect when you delete sda5, sda6 now becomes sda5 just because of how extended partitions work. In the past the boot loader (grub) might have problems so reinstalling might be necessary. I have not done this in many years so the exact results have fallen off the FILO.

No worries.

As a min you only need one partition since many distributions use a swap file now days.

Last edited by michaelk; 05-05-2021 at 08:43 PM.
 
Old 05-06-2021, 06:43 AM   #23
cyno77
Member
 
Registered: Mar 2021
Location: Sydney, Australia
Distribution: Ubuntu Linux
Posts: 47

Original Poster
Rep: Reputation: Disabled
Yes I intend to do that MichaelK, but does Linux also have to have it's boot files on Primary partition? I guess not?

U have been really helpful, so thankyou- you've no idea!

Also, computersavvy said I can't use gparted on msdos(mbr) for resizing. Do you know anything about that? I will investigate. As I have few options for another terminal as am not at home, if it goes wrong!

Thanks again, I will be calling this Solved now after this.
 
Old 05-06-2021, 07:16 AM   #24
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,783

Rep: Reputation: 5936Reputation: 5936Reputation: 5936Reputation: 5936Reputation: 5936Reputation: 5936Reputation: 5936Reputation: 5936Reputation: 5936Reputation: 5936Reputation: 5936
I've used gparted for both mbr and gpt disks. I am not sure what computersavvy is referring to. You do need to run it from a live USB version.

No linux does not care about where it located.
 
Old 05-06-2021, 09:45 AM   #25
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,568

Rep: Reputation: 2499Reputation: 2499Reputation: 2499Reputation: 2499Reputation: 2499Reputation: 2499Reputation: 2499Reputation: 2499Reputation: 2499Reputation: 2499Reputation: 2499
The system partition is not the partition on which the windows OS is installed, that partition, what windows refers to as the C:\ drive, is sda2.

If sda5 was created on windows it would have been formatted ntfs which it is.
Linux won't imstall to an ntfs partition so that's why Ubuntu created another partition (sda6) on which to install.

If sda5 is empty you can copy personal data files to that partition and leave the system files on sda2 which will decrease the used size on sda2.

If you don't want to do that, you can unmount sda3, sda5 and sda6 and if sda5 is empty then delete it. It would then be simpler to move sda3 (Extended partition to the right, to just before the beginning of sda6. This will leave unallocated space to the right of sda2 and you can then increase the size of sda2 to include the space previously used by sda5. If you delete sda5 and then move sda6 to the left and then move the Extended partition to the right, you will not only be resizing the partition but will copy the contents of sda6 to the beginning of sda3 and then copy all the contents of sda6 when you move sda3 to the right. This will take much longer with the same result.

The df command only shows mounted partitions while fdisk shows all partitions as well as sectors so we can see that sda4 is to the right of sda3, sda5 and sda6.

Also, as pointed out above if you delete a logical partition with a lower number then a logical partition you want to keep, in this case sda6 will change to sda5
 
Old 05-06-2021, 07:21 PM   #26
cyno77
Member
 
Registered: Mar 2021
Location: Sydney, Australia
Distribution: Ubuntu Linux
Posts: 47

Original Poster
Rep: Reputation: Disabled
Yancek, can I "move' partitions 'left & right's like that in gparted? Won't sda4 be in the way of moving sda6 to the left? Or sda3 to right?
 
Old 05-06-2021, 07:38 PM   #27
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,392

Rep: Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594
If I'm reading the start end numbers from your fdisk,
sda3 is between sda2 and sda4, sda5 and sda6 are located inside sda3(an extended partition that allows to have more than 4 partitions on a dos type drive. The first partition inside an extended partition will be sda5, regardless of the number of the extended partition whether it be sda1, sda2, sda3, or sda4.

When you start moving a linux file system around, in your case /dev/sda6
You most likely will have to fix booting problems afterwards.

Last edited by colorpurple21859; 05-06-2021 at 07:52 PM.
 
1 members found this post helpful.
Old 05-06-2021, 09:05 PM   #28
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,152

Rep: Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125
I've stayed out of this as the longer it has gone, the more confusing it must be for the OP, let alone the rest of us.
@Ana Hartley run the parted command I mentioned earlier - use the drop-down menu on the terminal to copy-and-paste the output here. And I agree you seem to have ceated a large NTFS partition which you seem to think Ubuntu would use to install into. This was a mistake - it can be done that way by reformatting it at install, but is pointless and confusing. Just leave space unallocated in future.
As for moving partitions around (including NTFS) as mentioned above gparted will do that fine and has good doco on the site. It's a GUI program that is basically like a block-sliding game. Works fine, and doesn't destroy data if you are careful

Hope I haven't added more confusion to the discussion.
 
Old 05-07-2021, 12:11 AM   #29
cyno77
Member
 
Registered: Mar 2021
Location: Sydney, Australia
Distribution: Ubuntu Linux
Posts: 47

Original Poster
Rep: Reputation: Disabled
yes syg00, i see your point & will be marking solved in a couple of hours if I get no response. Just gonna wipe Linux partitions and install again under something else. Win 7 should accept Extend partition if Linux is gone. I won't lose much as this one's a pretty new installation. Too afraid to mess w moving partitions or possibly ave to replace bootfiles/boot manager.

:~$ lsblk -f parted /dev/sda "print,free"
lsblk: parted: not a block device
lsblk: print,free: not a block device
NAME FSTYPE LABEL UUID FSAVAIL FSUSE% MOUNTPOINT
sda
├─sda1
│ ntfs SYSTEM_DRV
│ 0AEE7E7EEE7E623D 1.1G 23% /media/ana
├─sda2
│ ntfs Windows7_OS
│ 926C81376C8116DF 2.1G 96% /media/ana
├─sda3

├─sda4
│ ntfs Lenovo_Recovery
│ C428C1E628C1D796
├─sda5
│ ntfs New Volume
│ 74801BE9801BB11A 197.4G 0% /media/ana
└─sda6
ext4 b22022c0-18f3-4d67-ad1d-97c79ad4bd52 166.9G 8% /

Thankyou.
 
Old 05-07-2021, 05:44 AM   #30
quickbreakfast
Member
 
Registered: Oct 2015
Location: northern territory
Distribution: slackware 15
Posts: 338

Rep: Reputation: Disabled
Quote:
Originally Posted by Ana Hartley View Post
I won't lose much as this one's a pretty new installation.
If you back up your data immediately before you do a reinstall, you shouldn't loose anything.

By rights ALL your data will be on the backup...... Just don't leave the external drive connected as you do the re install, as I once did.

Quote:
Just gonna wipe Linux partitions and install again under something else.
Sound like a sane idea.

By the way, my root partition is about 70 G.
 
  


Reply

Tags
dual boot, extend, partitionioning, partitionsize, windows 7



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I increase my "/" partition space using unallocated space?(bodhi linux) PrathamBhatter Linux - Newbie 3 07-29-2020 05:56 PM
moving unallocated disk space into reiserfs partition. GUIPenguin Linux - General 3 04-08-2006 03:07 PM
Does the firewall apply also for the serial MGT? xpucto Solaris / OpenSolaris 1 01-28-2006 09:19 AM
add unallocated free space to existing disk drives!! ajaymyeg Linux - Networking 1 07-21-2004 08:17 PM
DPMS power mgt not working synaptical Linux - General 1 08-11-2003 10:28 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:46 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration