Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[Solved] Need help with partition mess
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
saturnalia0
n00b
n00b


Joined: 13 Oct 2016
Posts: 70

PostPosted: Sun Sep 03, 2017 10:39 pm    Post subject: [Solved] Need help with partition mess Reply with quote

I have originally installed this system with a swap partition, but I eventually disabled swap (long ago). Today I was going to set up /tmp to be a
tmpfs, and noticed the swap partition remains. `fdisk -l`:

Code:

/dev/sda1          2048       6143       4096     2M  4 FAT16 <32M
/dev/sda2          6144     268287     262144   128M 83 Linux
/dev/sda3        268288    1316863    1048576   512M 82 Linux swap / Solaris
/dev/sda4       1316864 1953525167 1952208304 930.9G 83 Linux


If I were to delete the swap partition, would I have to move the contents of /dev/sda4 "to the left"? I remember having to do that on gparted and it takes a long time. I've only ever used fdisk to partition disks from scratch, I'm not sure how repartitioning works.

Notice also that there's /dev/sda1 and /dev/sda2. I created those following the handbook standard partitioning scheme:

Code:

 Partition Filesystem   Size  Description
/dev/sda1  (bootloader) 2M    BIOS boot partition
/dev/sda2  ext2         128M  Boot/EFI system partition
/dev/sda3  (swap)       512M+ Swap partition
/dev/sda4  ext4         Rest  Root partition


But I'm not sure if /dev/sda2 is being used at all... df -h

Code:

Filesystem      Size  Used Avail Use% Mounted on
/dev/sda4       917G  135G  735G  16% /
devtmpfs         10M     0   10M   0% /dev
tmpfs           577M  792K  576M   1% /run
shm             2.9G     0  2.9G   0% /dev/shm
cgroup_root      10M     0   10M   0% /sys/fs/cgroup


df -h /boot

Code:

/dev/sda4       917G  135G  735G  16% /


I guess /dev/sda1 is in fact being used as it's BIOS-related...

So could I erase /dev/sda2 and /dev/sda3? Would that require a move on /dev/sda4?

To add to the mess... I was going to add the /tmp stuff to fstab, but the I noticed the contents are:

Code:

/dev/sda2               /               ext4            errors=remount-ro,noatime       0 1


Which does not seem right at all... I'm not sure what's going on.


Last edited by saturnalia0 on Fri Sep 08, 2017 2:45 am; edited 1 time in total
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 38830
Location: 56N 3W

PostPosted: Sun Sep 03, 2017 11:07 pm    Post subject: Reply with quote

saturnalia0,

/dev/sda1 is for use by grub. Don't mess with it. Its not yours. You system won't boot without it.
/dev/sda2 is your boot partition. Its not normally mounted, except for kernel updates.
Grub makes its own arrangements to read it. If you destroy it, your kernels will be removed and your system won'f boot.

Your swap is 512MiB and root is 930GiB by merging the two you gain <0.1% of the space on /
Its not worth the bother.

Also, disabling your swap partition does not prevent the kernel swapping. It only denies it one of the options.
It cannot swap dynamically allocated memory without swap space.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
saturnalia0
n00b
n00b


Joined: 13 Oct 2016
Posts: 70

PostPosted: Sun Sep 03, 2017 11:35 pm    Post subject: Reply with quote

Thanks a lot, that cleared things up for me. The only thing I'm still confused about is /etc/fstab. Is it correct? Shouldn't there be a line for sda4 as well, or better say shouldn't the sda2 line be sda4 instead? I need to edit fstab to make /tmp a tmpfs, and I'm not sure what I should do about the current contents. Leave them be?
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 38830
Location: 56N 3W

PostPosted: Sun Sep 03, 2017 11:46 pm    Post subject: Reply with quote

saturnalia0,

I don't see your /etc/fstab posted.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
saturnalia0
n00b
n00b


Joined: 13 Oct 2016
Posts: 70

PostPosted: Mon Sep 04, 2017 2:08 pm    Post subject: Reply with quote

I posted the only line that is not a comment, on my original post. Here are the full contents:

Code:

# /etc/fstab: static file system information.
#
# noatime turns off atimes for increased performance (atimes normally aren't
# needed); notail increases performance of ReiserFS (at the expense of storage
# efficiency).  It's safe to drop the noatime options if you want and to
# switch between notail / tail freely.
#
# The root filesystem should have a pass number of either 0 or 1.
# All other filesystems should have a pass number of 0 or greater than 1.
#
# See the manpage fstab(5) for more information.
#

# <fs>                  <mountpoint>    <type>          <opts>          <dump/pass>

# NOTE: If your BOOT partition is ReiserFS, add the notail option to opts.
/dev/sda2               /               ext4            errors=remount-ro,noatime       0 1
#/dev/sda6              none            swap            sw              0 0
#/dev/sda7              /debhome        ext4            defaults,noauto 0 2
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 38830
Location: 56N 3W

PostPosted: Mon Sep 04, 2017 3:45 pm    Post subject: Reply with quote

saturnalia0,

sda2 is your /boot, if you use one
sda4 is your /.

The root entry is /etc/fstab is only used to determine the filesystem type to run rootfsck during boot.
It can't be used to mount root because its on the root partition,

Not having a /boot partition is OK, everything still works but if you do use one, it needs to be listed in /etc/fstab.

How to tell ...

Do
Code:
ls /boot
if you see a directory called grub, you do not need a /boot entry in /etc/fstab.
Just fix the partition number for the root entry.

If /boot/grub is missing, you do have a boot partition and need an entry in /etc/fstab for it or you will probably mess up installing kernel updates.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
saturnalia0
n00b
n00b


Joined: 13 Oct 2016
Posts: 70

PostPosted: Fri Sep 08, 2017 2:46 am    Post subject: Reply with quote

NeddySeagoon wrote:
The root entry is /etc/fstab is only used to determine the filesystem type to run rootfsck during boot.
It can't be used to mount root because its on the root partition


Duh! Of course. Thanks, I got it now.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum