LinuxQuestions.org
Help answer threads with 0 replies.
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 03-13-2016, 10:34 PM   #1
Odyssey1942
Member
 
Registered: Jul 2006
Posts: 287

Rep: Reputation: 30
Need help repartitioning SSD


I have managed to royally foul up my partitioning on an SDD. I happen to be installing Ubuntu Mate, but my questions have to do only with partitioning, so UM is a non-issue (I think) in the following.

Unless someone feels it is relevant, I will spare you the history of how I got to the mess that is reflected in the screenshot below.

What is important is that sda1 got set up by itself. I think it has to do with either the SSD's needs, or it has to do with whether this computer is BIOS OR UEFI. sda2 holds a version of Ubuntu 12.04 (installed 2 years ago) and works, but is getting shaky.

sda3 onwards is no-mans land. nothing works there. So what I want to so is to get rid of all the existing partitions (sda3 and higher) and make two EXT4 partitions of approx 37 GiB each. (It is probably extraneous info, but I intend to install Ubuntu Mate 14.40 in one of these two, using approx 1-2 GB for boot, 9GB for swap [I have 8GB RAM], 15GB for system, and the rest for home).

So I can use gparted, but will need lots of hand-holding for things like:
1)Are these partition sizes practical?
2)What order should the various partitions be created (seems to me I read that the boot should go first and swap at the end, but don't hold me to this and please improve my understanding as needed)?
3)Having created two 37GB EXT4 partitions, do I need to again format the various partitions that I have outlined above?
4)Anything else that I don't know to ask about?

I realize there are several questions here but they are part and parcel of one exercise. Thanks for any help
Attached Thumbnails
Click image for larger version

Name:	Screenshot--dev-sda - GParted 160313.png
Views:	48
Size:	80.6 KB
ID:	21143  
 
Old 03-13-2016, 11:36 PM   #2
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: PCLinux, Slackware
Posts: 6,869

Rep: Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247
I would not create a separate boot partition as it just complicates things, particularly for a new user. Just create a / (root) partition and swap of the sizes you want. 15-25 for / should be adequate. Unless you hibernate, 2-4GB should be enough for swap. Hard to say about the size of the partitions since we don't know the size of the drive. Usually the / partition will be much smaller than /home or /data where users keep all their personal data.

If you want to delete sda3 and higher, just use GParted from the Live CD and right click on each partition and unmount it then delete it. You can create your partitions for the install with GParted also. Simplifies things with the installer. Make sure you use the manual (Something Else) option for Installation Type with Mint.

If you have Ubuntu 12.04 installed, I doubt you are using UEFI. You would have an EFI partition showing in GParted and it's not there.

If you are not familiar with GParted, you could review their manual at the link below before starting.

http://gparted.org/display-doc.php%3Fname%3Dhelp-manual
 
1 members found this post helpful.
Old 03-13-2016, 11:46 PM   #3
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 14,832

Rep: Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820
More or less agree - but be careful deleting those swap partitions. If you get rid of them, your Ubuntu 12 system won't boot. Modify its fstab first to remove the swap entry. You can always fix it later.
You can't create a partition then sub-partition it later to /boot, / and /home. They are all separate partitions in your plan. Personally I wouldn't even have a /home for separate installs on the one disk - just use the one 37G partition for the lot. Do the same on the other install.

I would think sa1 is an efi partition - should be [v]fat, so I'm surprised gparted doesn't recognise it. Let's see what "sudo parted -l" shows.
 
1 members found this post helpful.
Old 03-13-2016, 11:52 PM   #4
sgosnell
Senior Member
 
Registered: Jan 2008
Location: Baja Oklahoma
Distribution: Debian
Posts: 1,054

Rep: Reputation: 276Reputation: 276Reputation: 276
You're apparently using a GPT partition table, since that's the only way to get that many primary partitions. I would expect that the computer you're using that on would use UEFI. You should do some research on both of those, and that research should tell you the partitions needed for a UEFI boot. Start here:

https://www.happyassassin.net/2014/0...lly-work-then/
 
1 members found this post helpful.
Old 03-14-2016, 02:04 AM   #5
robertbas
Member
 
Registered: Sep 2006
Posts: 79

Rep: Reputation: 20
Just to remind myself, leave 10% free space within each partition to allow the drive to self repair. I may stand corrected on this but apparently it is good practise for ssd's
 
Old 03-14-2016, 03:59 AM   #6
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,130
Blog Entries: 2

Rep: Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825
Quote:
Originally Posted by robertbas View Post
Just to remind myself, leave 10% free space within each partition to allow the drive to self repair. I may stand corrected on this but apparently it is good practise for ssd's
Modern SSDs already have a physical spare area for that purpose, so that it is not necessary to do that. This is good advice for mechanical disks, though, since it helps preventing fragmentation (which is not an issue on SSDs).
 
Old 03-14-2016, 05:25 AM   #7
beachboy2
Senior Member
 
Registered: Jan 2007
Location: Wild West Wales, UK
Distribution: Ubuntu MATE, Mint MATE & antiX MX-15
Posts: 1,664
Blog Entries: 5

Rep: Reputation: 562Reputation: 562Reputation: 562Reputation: 562Reputation: 562Reputation: 562
Odyssey1942,

I would suggest that you backup all your personal data and then start with a clean slate.

Then use a gparted disk to create a single swap partition of say 2GB (sda1).

Then create an Extended Partition (sda2) using the whole of the rest of the drive. Within this EP you can then create multiple Primary partitions.

Next decide on how many Linux distributions you require. Probably 3 if I understand you correctly.

For sake of argument let's say there is room for 3 x 37GB.

You can then either just use 3 separate root (/) partitions, without any Home partitions:

(37GB) sda3……………. / for distro A

(37GB) sda 4…………... / for distro B

(37GB) sda5 …………. / for distro C

OR

also have 3 separate Home partitions:

12GB root sda3 distro A

25GB home sda4 distro A

12GB root sda5 distro B

25GB home sda6 distro B

12GB root sda7 distro C

25GB home sda8 distro C

The numbering may come out slightly differently in practice but it will amount to the same thing.

Another way is to have a common Home partition with 3 separate root partitions.

SSD for system with a conventional hard drive for data:

http://www.linuxquestions.org/questi...d-drive-36892/

Last edited by beachboy2; 03-14-2016 at 05:29 AM.
 
Old 03-14-2016, 08:59 AM   #8
Higgsboson
Member
 
Registered: Dec 2014
Location: UK
Distribution: Debian 8 Cinnamon/Xfce/gnome classic Debian live usb
Posts: 508

Rep: Reputation: 49
There is one idea that if a partition on an SSD is small, then there is less space for the wear-levelling software (which is in the SSD itself) to equally distribute the wear.
This makes sense, but I'm not sure how credible the idea is.superuser.com/disadvantages-of-partitioning-an-ssd

But it seems that having lots of free space in a partition is generally a good idea to get more longevity out of an SSD.

There is an important point about 'aligning SSD partitions'. This is where the start and end of a partition can be divided into 4kb sizes and matches the way the SSD always deletes in 512kb blocks. This prevents the SSD from deleting two blocks when it can delete only one block. It's explained better here: linux-mag.com

There are also bios, OS and browser changes you can do to get more life out of the SSD. The Arch linux page gives these options some authority Tips_for_maximizing_SSD_performance and this guy from YT shows you how to do it Don't call me lenny
 
Old 03-14-2016, 12:46 PM   #9
Odyssey1942
Member
 
Registered: Jul 2006
Posts: 287

Original Poster
Rep: Reputation: 30
Wow! Thanks for all the great replies and for so much to think about.

I will go through and clarify any omissions of mine and ask questions as I go.

Yancek, The SSD is 120GB and I will be installing U Mate (not Mint). I installed the present Ubuntu 12.04 fall-back (to get back to a Gnome 2 type desktop) in 2014, although it is on a computer that is a mixture of parts and I don't remember the mobo and cpu, so unsure if BIOS or UEFI. Is there a way to interrogate using either a GUI (preferred) or CLI if no GUI, to determine which it is without taking the computer out of it's current place (big job) and taking the cover off?

I will plan on 15GB for / and 22 for /home.

I take it from all that a swap of some size is necessary and should not be omitted. If someone would please confirm this, that will help me better understand. I don't plan to use hibernation (for reasons which will be the subject of another post soon), so will plan to use 2GB for /swap, pending further guidance.

syg00, last time I tried U 12.04 booted up OK, so hopefully I haven't screwed things up by unknowingly deleting swap partitions.

The reason for using separate / and /home is that I intend to later add a large HDD for use as /home, moving the /home partition there. Maybe it is no easier than just having both in one 39GB partition, but my thought is that I would re-install UM 14.04 with the /home partition on the HDD. Anyone's thoughts on this appreciated.

I have read the link posted by sgosnell, and I am even more confused than ever about BIOS/gpt/UEFI and that may be a big part of the problems that I have been encountering. So maybe I need to get that part of this straightened out before trying to get through the install? (BTW, when I run the live CD, the first screen that comes up has at the bottom a graphic of what looks like a screenshot and "=" and a graphic of a person with outstretched arms surrounded by a circle. I think I remember reading somewhere that this has to do with the BIOS/UEFI issue, no?)

Also yesterday I ran a BOOTINFO and got this if it is helpful

http://paste.ubuntu.com/15379788/

So will stop here for now and wait for further advice on this issue before continuing this in a later post.

Thanks again for all the great input.
 
Old 03-14-2016, 01:37 PM   #10
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,130
Blog Entries: 2

Rep: Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825
Quote:
Originally Posted by Odyssey1942 View Post
I take it from all that a swap of some size is necessary and should not be omitted.
No. If swap is needed depends on your specific use of the machine and the amount of RAM you have. On my main system with 16GB of RAM I don't use swap anymore and don't have any problems with that, while on my laptop with "only" 4GB of RAM I have 1GB of swap just to be safe.
Quote:
Also yesterday I ran a BOOTINFO and got this if it is helpful
Indeed it is. It tells us that you use a GPT partitioned disk on a BIOS system, so no UEFI.
 
Old 03-14-2016, 02:32 PM   #11
Odyssey1942
Member
 
Registered: Jul 2006
Posts: 287

Original Poster
Rep: Reputation: 30
Tobi, very helpful. Good to have that BIOS/UEFI matter clarified. Further on this, are there any potential problems with the gpt/BIOS setup that I need to be aware of? Also, do you have an opinion about what sda1 is, how it got there, and whether it is essential?

While I was writing the previous post, I tried to install UM 14.04 with:
2GB swap
15GB system
22GB home

and it failed. I took a screenshot for whatever it might reveal (see below)

The grub menu only shows the 12.04 install but not the 14.04 at all. If I go down the list and click on 12.04 it starts normally, but if I click on "Ubuntu" at the top of the list, it gave these messages

Quote:
11.466978 ata4 softreset failed (1st FIS failed)
21.457255 ata4 softreset failed (1st FIS failed)
Gave up waiting for root device. Common problem
--Boot arguments (cat/proc/cmdline)
--Check rootdelay = (did system wait long enough?)
--Check root = (did system wait for right device?)
--Missing modules (cat/proc/modules; ls/dev)
Alert! dev/disk/by-uuid/ (uuid # here ) does not exist

Dropping to a shell!

BusyBox v1.21.1 (Ubuntu 1:1.21.0 - 1Ubuntu1) built-in shell (ash)
Enter 'help' for list of built-in commands
(initramfs)[56.427211] soft reset failed (1st FIS failed)
[61.422347] ata4: soft reset failed (1st FIS failed)
[61.422382] ata4: soft reset failed (1st FIS failed)

Whew! that took a really long time to hand-write, then type out, so if it is not helpful, please will someone please advise, in which case I will not repeat the exercise in future. Thanks.

Hopefully some of this will be helpful in cluing some of you in to what is the problem?
Attached Thumbnails
Click image for larger version

Name:	Screenshot-ubuntu@ubuntu_ -.png
Views:	7
Size:	75.5 KB
ID:	21150  
 
Old 03-14-2016, 04:53 PM   #12
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: PCLinux, Slackware
Posts: 6,869

Rep: Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247
sda1, as you can see in the image in your last post, is a BIOS boot partition used with GPT. It is very much larger than normal, they are usually 1-2MB.

It would have been useful for you to post the actual UUID in the error message to compare against your actual partition UUIDs.

Which partition did you install Ubuntu 14.04 Mate to? Your boot repair shows 12.04 on sda2 as well as two instances of 14.04 on sda3 and sda6. You also seem to have at least boot files on sda4. Not sure what that's about.

Try rebooting 14.04 again and copy the UUID from the error message and post it here. Then run: sudo blkid and also post the output here.

Last edited by yancek; 03-14-2016 at 09:19 PM.
 
Old 03-14-2016, 05:43 PM   #13
Odyssey1942
Member
 
Registered: Jul 2006
Posts: 287

Original Poster
Rep: Reputation: 30
I had copied the uuid, but did not type in because I am a slow and inaccurate typist, and did not realize it might be useful. I see how now:

It is b98f3c1e-8b77-4aae-8ba7-7c1f4f3ef363

12.04 is my two year old Ubuntu Fall-back that I want to replace with Ubuntu Mate 14.04 (and which I want to leave in place till I can get UM 14.04 working again.)

From memory, the most recent attempt was:
sda3 was swap
sda4 was /
sda5 was /home

and it was marked to format / and /home as EXT4

A little history might be helpful. The very first time (last Thursday night) I installed UM 14.04, it ran like a champ. I spent the better part Friday, on and off, tweaking things, including setting the HDD to go into hibernation after 2 hours of inactivity. The latter just before going toes up for the night. I cannot remember for sure but I either had no /swap or only 2GB (and computer has 8GB RAM)

The next morning, I attempted to wake up the computer, but it would not come to life. When I tried to reboot, it gave an error message about not finding sdb1 (where /home had been installed). (sdb is a 1T HDD divided into two EXT4 partitions). Either the HDD failed during the night (and if so, only the second hard drive failure in all my years of PC's) or it is in deep hibernation and I do not know how to wake it?

Then tried to install UM again, but this time both system and home into sda4 with the idea of being able to examine sda3 Also attempted to set up a 1G /boot and a 2G swap. But it will not install, or at least not boot up. Have tried several other times to install, including the latest after finally figuring out how to get rid of all the fractured partitions.

So all those instances of various bits are probably the result of these many attempts to install

Blkid (from Live CD):

/dev/loop0: TYPE="squashfs"
/dev/sda2: UUID="7fff0116-ceaa-46ad-b43e-233b5e359a58" TYPE="ext4"
/dev/sda3: UUID="aa37cd45-d4cc-416d-9dfe-d120fa0d817a" TYPE="swap"
/dev/sda4: UUID="b98f3c1e-8b77-4aae-8ba7-7c1f4f3ef363" TYPE="ext4"
/dev/sda5: UUID="14cd060e-2908-4e7f-9322-35d9a7c4ad15" TYPE="ext4"
/dev/sr0: LABEL="MATE_14042" TYPE="iso9660"

Hope this gets us closer to a successful install. Thanks.

Last edited by Odyssey1942; 03-14-2016 at 06:26 PM.
 
Old 03-14-2016, 09:50 PM   #14
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: PCLinux, Slackware
Posts: 6,869

Rep: Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247
Your boot repair output shows the below output for sda4 on /etc/fstab on sda6 and sda3. You can see they are identical and are not the same as the output of blkid you posted

Quote:
fstab sda6
/boot was on /dev/sda4 during installation
UUID=d2586c16-cd98-45f8-aabf-05b98485c3c7 /boot ext4 defaults 0 2

fstab sda3
# /boot was on /dev/sda4 during installation
UUID=d2586c16-cd98-45f8-aabf-05b98485c3c7 /boot ext4 defaults 0 2
blkid output posted: /dev/sda4: UUID="b98f3c1e-8b77-4aae-8ba7-7c1f4f3ef363" TYPE="ext4"

blkid output from boot repair: /dev/sda4 d2586c16-cd98-45f8-aabf-05b98485c3c7 ext4

Since you did a new install, things were changed so the only thing I could suggest at this point is to run boot repair again. None of your grub.cfg menus show the UUID you posted: UUID="b98f3c1e-8b77-4aae-8ba7-7c1f4f3ef363" TYPE="ext4"
 
Old 03-14-2016, 09:58 PM   #15
sgosnell
Senior Member
 
Registered: Jan 2008
Location: Baja Oklahoma
Distribution: Debian
Posts: 1,054

Rep: Reputation: 276Reputation: 276Reputation: 276
If you're going to start over with the partitioning, you might want to delete the gpt and replace it with a standard DOS mbr partition. Either way, read this webpage for needed info. Rod Smith has some useful software, and some good advice there.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Access To Encrypted SSD Partition With Native Password in SSD>SATA Enclosure skidvicious Linux - Hardware 5 12-03-2015 05:40 PM
[SOLVED] I have a SSD a 500GB drive and a 2TB drive and want to move Ubuntu from 500GB to SSD greatormesby Linux - Newbie 12 07-06-2015 10:58 AM
SSD raid1 vs SSD raid10 advice ? wonker Linux - Hardware 8 05-23-2012 02:46 AM
repartitioning brixtoncalling Slackware 10 10-28-2009 04:22 AM


All times are GMT -5. The time now is 02:05 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration