[SOLVED] Cannot extend c:\win on dualboot as no unallocated space nextdoor partition, extend is greyed out on disk mgt,
Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Yancek, can I "move' partitions 'left & right's like that in gparted?
I'm not sure if you have reinstalled Ubuntu yet but if not, the answer to the above question is YES. For an extremely detailed explanation you can see the link I posted earlier to the GParted Manual if you want.
Quote:
Won't sda4 be in the way of moving sda6 to the left? Or sda3 to right?
NO. That's why I asked you to post the output of fdisk, because it shows the beginning and end sectors for each partition and from the output of that command you posted above it is clear as pointed out above that sda4 is after sda3, 5 & 6.
Quote:
Too afraid to mess w moving partitions or possibly ave to replace bootfiles/boot manager.
When you boot windows, you should see the ntfs partition you created (shown as sda5 in Linux) and by a drive letter in windows, D:\ or E:\ or similar. Simplest solution to avoid partitioning and reinstalling Ubuntu would be to copy personal data folders/files to this partition from your windows C:\ partition which will leave room there for the system files.
Unfortunately I don't have ANYTHING installed programwise on Windows C:, except lenovo-tools utility & SDK. I wouldn't know where to start to find all the locations of those files And correctly name them so O/s could find them, not least that, Win Really does have almost No space & I truly believe I will have to expand C: for it to function.
The minute size of C: & system win was just the file %of space LEFT, not used, in the output of the command U mentioned in my written, copied output post. Whatever. They r bigger than what U thought is all I'm saying. No big deal.
BTW, WHAT SORT of backup is everybody suggesting I do that I would BE ABLE to use to restore PARTICULAR DIRECTORIES seperately? Or just is rsync a good backup I'd be able to restore from if I ran into trouble partitioning and lost a drive/partition or boot file needed reasserting? What backup is most facilitating?
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.
I have never used gparted to move or resize an extended partition. My caution was that I did not know if it was even possible since doing so with already having logical partitions located there could be disastrous, especially with the entire linux OS in the logical partitions. Thus I recommended against having a newbie try it in an abundance of caution.
I have never used to move or resize an extended partition. My caution was that I did not know if it was even possible since doing so with already having logical partitions located there could be disastrous, especially with the entire linux OS in the logical partitions
The extended partition can be resized with gparted from a live iso. The moving of an extened partition involves moving the logical partitions then resizing the extended partition.
In the ops setup, with gparted, delete sda5 and resize the extended partition smaller so as to make room between it and sda2, then resize sda2 to fill in the empty space.
This will result in a grub-rescue prompt which can be bypassed with the following
at the grub-rescue prompt:
Code:
set prefix=(hd0,5)/boot/grub
insmod normal
normal
This should bring up the grub menu
once booted into ubuntu open a terminal and run
Code:
sudo grub-install /dev/sda
If sda2 is resized with gparted to make bigger, will need to boot into windows and run windows chkdsk
Last edited by colorpurple21859; 05-08-2021 at 03:10 AM.
THIS is just the kind of rigorous information that credits your forum so well. Thankyou. I think I have all the info I need now, though I doubt I could have got such a decent rundown elsewhere..I have read a lot now, booting implements , & think I have enough info. I've done my backups. This thread is solved, so thank-you.
Unfortunately I don't have ANYTHING installed programwise on Windows C:, except lenovo-tools utility & SDK. I wouldn't know where to start to find all the locations of those files And correctly name them so O/s could find them, not least that
Appears to be a lack of communication. I suggested that if you wanted to avoid the partitioning, since you already have large, existing windows (ntfs) partition (sda5), you could simply copy 'personal' data to that partition. Personal data being document files you created, things like pictures, videos and text files you created. There would be no need to copy any system files. A default install of windows 7 should be less than 20GB and the information posted shows that partition (sda2) has over 55GB of data and system files so you either have a lot of personal data or have installed a number of programs. Using the already existing sda5 partition was just a suggestion, another option which would have avoided partitioning but you should have enough information now to do the partitioning.
BTW, WHAT SORT of backup is everybody suggesting I do that I would BE ABLE to use to restore PARTICULAR DIRECTORIES seperately? Or just is rsync a good backup I'd be able to restore from if I ran into trouble partitioning and lost a drive/partition or boot file needed reasserting? What backup is most facilitating?
If I had directories(folders) like /cyno77/lives/on/pinchgut and wanted to make a backup of everything on them I'd use something like the following
Code:
rsync -vr --update /cryno77/ /run/media/cyrno/?
Which would if needs be create any needed folders and missing or changed files.
The ? is probably, unless it has been labeled something else, the alphanumeric address of the external drive (my constantly used external drive is called olga).
Now if I wanted to restore everything in the /on folder I'd use the copy (cp) command, with the command.
which would copy everything in the /on folder, including sub folders of /on, back to /cryno77/lives/on folder.
Read about the switches I'd used/have suggested in the cp man page.
Incase you missed the joke, pinchgut is about a mile ENE of Bennelong point, and would be an great residential address in Sydney,,,,,,, providing you can swim!
Well colourpurple, I resized all specified partitions, using Mib in Gparted. When rebooted, I got to Grub rescue and it just ignored all my efforts to select correct root partition as you specified, and came back with standard grub rescue prompt. It validated nor error responsed nothing. With no response I went into Ubuntu Live Usb, as Gparted said, and tried to mount correct partitions, (couldn't even get Grub prompt up in live usb) and it said,"/mnt/proc" & "/mnt/etc/fstab" doesn't exist. After creating them.
Sorry but your Disks and fdisk output do not show that. All they show is that you deleted the sda5 ntfs partition. You need to move the beginning of the Extended partition (sda3) to the beginning of sda6 and leave 1-2 MB after sda3 and before the current sda6. After you Apply that change, move sda2 to the right, to the beginning of sda3. Do this with either GParted on a CD/DVD/USB or from your Ubuntu install USB which contains GParted.
Look at your fdisk output for sda3, the Extended partitiion. It begins at sector: /dev/sda3 287834112 while the Ubuntu partition (shown as sda5) begins at sector: /dev/sda5 537227264. That's a lot of unallocated space in the Extended partition before Ubuntu.
Your Extended partition shows as 314.2GB in fdisk and sda5 shows as 195.3GB so that leaves about 119GB of free/unallocated space.
Quote:
I can see no * in sda5 in fdisk
I've no idea what you mean by that unless you mean the * which shows on sda1. That isn't necessary in Linux but is required for the windows boot partition so not a problem.
Quote:
I moved sda3 to right while shrinking, and I am afraid this being the container for sda5new I may have deleted some of it? I then attempted to move Windows sda2 larger to right by 80 GB.
Well, that didn't work as both your fdisk and Disks output shows although you did delete the old sda5, the windows partition. Are you sure you clicked Apply in GParted after making the changes? Try it again is all I can suggest.
Quote:
When rebooted, I got to Grub rescue and it just ignored all my efforts to select correct root partition
After resizing with GParted and trying to boot, if you have problems with the method suggested above by colorpurple21859 post specifics on exactly what happens.
With no response I went into Ubuntu Live Usb, as Gparted said, and tried to mount correct partitions, (couldn't even get Grub prompt up in live usb) and it said,"/mnt/proc" & "/mnt/etc/fstab" doesn't exist. After creating them.
cryno77, In your post #39 the image doesn't mention Gparted which my electronic marvel just did when I just opened it, so I am a touch confused as to how you got that image. However....
That image also shows that immediately besides, to the left of, the coloured section the is 128GB free space and to the left of that is another 9GB free space.
Nor does the image say what way the free spaces partitions are formatted (as it does for the rest of the image). Nor is there any indication of what format the coloured section is formatted.
Edit. I've just noticed that partition 5 (which appears to be part of partition 3) is formatted ext4. Sorry, I should pay closer attention.
Which suggests to me that the fstab and proc have been installed to unformatted partitions.
To check whether they exist type,
Code:
ls /mnt/pr*
ls /mnt/etc/fs*
I'd be surprised if the output of either command finds either file.
Anyhow I'd go back into Gparted, remove/delete the free spaces and shrink your partition 3 (root?) to about 70+ GB, (currently 330+GB) and give partition 4 (which I'd call home or any name) the space not otherwise used. Imo 15GB is too small for a home partition.
When you've done that there should be a green tick along the top of Gparted. Clicking the tick will apply the changes ..... including formatting your changes. Which you've told the electronic marvel you want formatted to whatever.
After Gparted has finished, check that each partition indicates it is formatted the way you want them. When they are the you want them exit Gparted and do your install.
After a cut and colour today, I'll find out what covid restrictions for travel between our parts of the country are. Maybe I'll be in your part of the world on Sunday and Monday ...... I'll let you know.
Last edited by quickbreakfast; 05-12-2021 at 04:14 PM.
Anyhow I'd go back into Gparted, remove/delete the free spaces and shrink your partition 3 (root?) to about 70+ GB, (currently 330+GB) and give partition 4 (which I'd call home or any name) the space not otherwise used. Imo 15GB is too small for a home partition.
You can't delete free/unallocated space. That won't help. Partition 3 is the Extended partition and the Ubuntu partition (sda5) is in the Extended partition. sda4 is likely the windows recovery partition so I would not suggest deleting it. The OP needs to move sda3 to the right then move sda2 to the right.
Thank-you Yancek, michaelk,colourpurple21859,& quickbreakfast, this is all very compelling...
Well output of ls /mnt/pr* was:
root@ubuntu:~# ls /mnt/pr*
ls: cannot access '/mnt/pr*': No such file or directory
Same for: # ls /mnt/etc/fs*
So they've both disappeared. I'm assuming the UUID and drive/volume names are all able to be accessed by everything(?)
--Thanks Yancek moving sda3 & sda 2 to right is logical.
I don't care if I don't have a 'working OS', I bought this 2016 Lenovo laptop to learn on, and that is all. Don't really care if I lose OS, just wanted to learn how they boot, etc. Fortunately!
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.