any easy way to resize the root partition ?

You have a problem with Salix? Post here and we'll do what we can to help.
User avatar
zazlox
Posts: 39
Joined: 19. Jun 2012, 02:24
Location: Morocco

any easy way to resize the root partition ?

Post by zazlox »

hello everybody

i have a 250 go drive , only for salix installation . i did an automatic installation but it gave only 5 go for the root partition . well i was installing some packages and some programms ? i get a message that i don't have enough space

Code: Select all

root[zazlox]# df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/root       5.8G  5.3G  243M  [color=#BF0000]96% [/color]/
/dev/sdb3       223G  6.3G  205G   3% /home
tmpfs           1.6G     0  1.6G   0% /dev/shm
root[zazlox]# 


Code: Select all

root[zazlox]# fdisk -l

Disk /dev/sda: 250.1 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders, total 488397168 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 identifier: 0x0002bff8

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1            2048   488396799   244197376   83  Linux

Disk /dev/sdb: 250.1 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders, total 488397168 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 identifier: 0x0d2ed6b4

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *          63    12289724     6144831   83  Linux
/dev/sdb2        12289725    14346044     1028160   82  Linux swap
/dev/sdb3        14346045   488392064   237023010   83  Linux

Disk /dev/sdc: 2005 MB, 2005401600 bytes
62 heads, 62 sectors/track, 1018 cylinders, total 3916800 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 identifier: 0x00000000

   Device Boot      Start         End      Blocks   Id  System
root[zazlox]# 
The Linux philosophy is 'Laugh in the face of danger'. Oops. Wrong One. 'Do it yourself'. Yes, that's it.
User avatar
Tim CowChip
Posts: 304
Joined: 27. May 2011, 03:35
Location: Cascade Locks, OR

Re: any easy way to resize the root partition ?

Post by Tim CowChip »

If you don't have any data that you want to keep, and even if you do, maybe you can back it up externally and re-install formatting the entire drive. The seperate /home partition is a way of retaining data across installations, but if you can copy your /home folder to your other drive it accomplishes the same thing.
Copy your data and format sdb then re-install.
ImageImage
User avatar
mimosa
Salix Warrior
Posts: 3311
Joined: 25. May 2010, 17:02
Contact:

Re: any easy way to resize the root partition ?

Post by mimosa »

The installer asks you to choose whether to partition the disk manually or automatically. I'm surprised you only got 5GB, if you chose to do it automatically. You should get / /home and swap that way.

If it isn't working for you you may wish to use Gparted to set up your partitions (perhaps from a Salix Live cd or usb). Then select manual installation (or use the Salix live installer), and opt to mount / and /home at the partitions you've set up.

But it may be worth another go with the automatic installer first, after wiping the hard disk, as Tim CowChip suggested.

EDIT

But do be careful you are working on the right disk ;)
Shador
Posts: 1295
Joined: 11. Jun 2009, 14:04
Location: Bavaria

Re: any easy way to resize the root partition ?

Post by Shador »

You can boot from a LiveCD (e.g. Salix Live, Gparted Live) or another drive. Should you choose to boot another operating system with gparted installed to HDD it's important hat that OS completely resided on a different HDD!
Once inside fire up gparted and shrink and move partitions to make space for growing your root partition. When it comes to moving this is not exactly a fast operation and for xfs shrinking is not possible at all - only growing is.
Image
User avatar
zazlox
Posts: 39
Joined: 19. Jun 2012, 02:24
Location: Morocco

Re: any easy way to resize the root partition ?

Post by zazlox »

thanks everybody for your nice comments . i went for the gparted method . i resized the home directory , i took about 30 gigabyte for unllocated free space . so as to add it to root partition , but how can i add this 30 gigabyte to the root partition , in my case it's [ sdb1 ] . here is some pics of the gparted windows

http://imageshack.us/photo/my-images/7/ ... otdvw.png/

http://imageshack.us/photo/my-images/70 ... ot1dl.png/

when i click resize on sdb1 , i get that small window but how and where to add that 30 gigabyte . thanks for your help and sorry about my bad english .
The Linux philosophy is 'Laugh in the face of danger'. Oops. Wrong One. 'Do it yourself'. Yes, that's it.
Shador
Posts: 1295
Joined: 11. Jun 2009, 14:04
Location: Bavaria

Re: any easy way to resize the root partition ?

Post by Shador »

As I said you need to move the partitions (here: sdb2 and sdb3) so the unallocated space is directly adjacent to the partition you want to add it to. Block devices are linear and partitions use only one single continous range of that block devices - not multiple ranges.
Image
User avatar
Tim CowChip
Posts: 304
Joined: 27. May 2011, 03:35
Location: Cascade Locks, OR

Re: any easy way to resize the root partition ?

Post by Tim CowChip »

The next time you install Sailx or any other OS, consider using the entire drive or partition and mounting it as "/". This way you can grow folders as big as you want. Seperate partitions like /home or /usr or /var, are overrated and, as you have already seen, have their limitations.
ImageImage
User avatar
mimosa
Salix Warrior
Posts: 3311
Joined: 25. May 2010, 17:02
Contact:

Re: any easy way to resize the root partition ?

Post by mimosa »

@Tim CowChip I agree but still think the installer's default of the classic root home swap is a good option.

And it's perfectly doable to move the partiions along as you would have to in this case if you want to start from what you've got - just that there is a risk of data loss if the move goes wrong, so back up any important data. And it may take a while to complete. But in your situation, maybe you haven't had the time to generate any data, in which case, I'd say just format and start from scratch as Tim originally suggested.

Gparted is a clear graphical tool but you need to understand the order of its operations: for intance, first shrink the partition, then move it over to make room.
Shador
Posts: 1295
Joined: 11. Jun 2009, 14:04
Location: Bavaria

Re: any easy way to resize the root partition ?

Post by Shador »

Tim CowChip wrote:The next time you install Sailx or any other OS, consider using the entire drive or partition and mounting it as "/". This way you can grow folders as big as you want. Seperate partitions like /home or /usr or /var, are overrated and, as you have already seen, have their limitations.
I don't consider that a good solution. Separation of system data and user data has proven itself for a long time. Why? It's handy if you have multiple OS or if your system partition gets corrupted or if you want to reinstall for some other reason. Without any copying around all your data is still available. Also if your user partition runs full it won't have any negative impact on the core system.
I never had serious problems with a root partition sized 12-15GB, a swap as I deem fit and as space constraints allow and a home partition with as much space as possible. It's hard to get 12GB full with applications and if other data starts filling up your root it doesn't belong there probably anyway and you can redirect to your home partition using symlinks or bind mounts.
Image
User avatar
zazlox
Posts: 39
Joined: 19. Jun 2012, 02:24
Location: Morocco

Re: any easy way to resize the root partition ?

Post by zazlox »

thanks everybody for your nice comments and support .
i was trying that gparted method , but it takes long to move patitions and also it was something wrong or a mistake i did it when shrinking and moving , it doesn't work , so i plan to reinstall salix . so i choose the step by step method , giving the root=boot partition 40 gigbyte , swap 6 gigabyte " double ram size" , and the rest for home . in the first i install the master boot mbr on the first drive , it gaves an error , something about bios , and two system using the same mbr , something like that even that i finished the installation , i rebooted i can see salix splash screen , but it hangs on some errors , so i was thinking the problem maybe because i installed lilo onthe first drive , because i see and i have in ranking sda first then sdb , so i try another installation with the same setup , only changing lilo installation , i choose the first option , i don't remeber well the name , there are two safe option , i choose the first one , even that after i rebooted still errors , i wrote the error on a paper , it looks like that

Code: Select all

EXT3-fs ( sdb1): error: couldn't mount because of unsupported optional features ( 240) 
kernel panic-not syncing:No init found.try passing init=option to kernel
pid : 1, comm:swapper not tainted 2.6.37-smp#2

call trace:
?print k+0x1d/0x1f
panic+0x5c/0x14d
other info, i got them using a live cd from the system files i installed

lilo.conf

Code: Select all

# LILO configuration file
# generated by 'liloconfig'
#
# Start LILO global section
# Append any additional kernel parameters:
append="quiet  vt.default_utf8=1"
boot = /dev/sdb1

# Boot BMP Image.
# Bitmap in BMP format: 640x480x8
  bitmap = /boot/salix.bmp
# Menu colors (foreground, background, shadow, highlighted
# foreground, highlighted background, highlighted shadow):
  bmp-colors = 255,20,255,20,255,20
# Location of the option table: location x, location y, number of
# columns, lines per column (max 15), "spill" (this is how many
# entries must be in the first column before the next begins to
# be used.  We don't specify it here, as there's just one column.
  bmp-table = 60,6,1,16
# Timer location x, timer location y, foreground color,
# background color, shadow color.
  bmp-timer = 65,29,0,255

# Standard menu.
# Or, you can comment out the bitmap menu above and 
# use a boot message with the standard menu:
#message = /boot/boot_message.txt

# Wait until the timeout to boot (if commented out, boot the
# first entry immediately):
prompt
# Timeout before the first entry boots.
# This is given in tenths of a second, so 600 for every minute:
timeout = 50
# Override dangerous defaults that rewrite the partition table:
change-rules
  reset
# VESA framebuffer console @ 1024x768x64k
vga = 791
# Normal VGA console
# vga = normal
# VESA framebuffer console @ 1024x768x64k
# vga=791
# VESA framebuffer console @ 1024x768x32k
# vga=790
# VESA framebuffer console @ 1024x768x256
# vga=773
# VESA framebuffer console @ 800x600x64k
# vga=788
# VESA framebuffer console @ 800x600x32k
# vga=787
# VESA framebuffer console @ 800x600x256
# vga=771
# VESA framebuffer console @ 640x480x64k
# vga=785
# VESA framebuffer console @ 640x480x32k
# vga=784
# VESA framebuffer console @ 640x480x256
# vga=769
# End LILO global section
# Linux bootable partition config begins
image = /boot/vmlinuz
  root = /dev/sdb1
  label = Linux
  read-only
# Linux bootable partition config ends
fstab

Code: Select all

/dev/sdb2        swap             swap        defaults         0   0
/dev/sdb1        /                ext4        noatime,defaults 1   1
/dev/sdb3        /                ext4        defaults         1   2
#/dev/cdrom      /mnt/cdrom       auto        noauto,owner,ro  0   0
/dev/fd0         /mnt/floppy      auto        noauto,users,rw,umask=00 0   0
devpts           /dev/pts         devpts      gid=5,mode=620   0   0
proc             /proc            proc        defaults         0   0
tmpfs            /dev/shm         tmpfs       defaults         0   0

Code: Select all

[liveuser@localhost ~]$ su
[root@localhost liveuser]# fdisk -l

Disk /dev/sda: 250.1 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders, total 488397168 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 identifier: 0x0002bff8

   Device Boot      Start         End      Blocks   Id  System

Disk /dev/sdb: 250.1 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders, total 488397168 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 identifier: 0x00067a58

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *          63    78124094    39062016   83  Linux
/dev/sdb2        78124095    89835479     5855692+  82  Linux swap / Solaris
/dev/sdb3        89835480   488397167   199280844   83  Linux

Disk /dev/dm-0: 3221 MB, 3221225472 bytes
255 heads, 63 sectors/track, 391 cylinders, total 6291456 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 identifier: 0x00000000

Disk /dev/dm-0 doesn't contain a valid partition table

Disk /dev/dm-1: 3221 MB, 3221225472 bytes
255 heads, 63 sectors/track, 391 cylinders, total 6291456 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 identifier: 0x00000000

Disk /dev/dm-1 doesn't contain a valid partition table

Disk /dev/sdc: 2020 MB, 2020904448 bytes
63 heads, 62 sectors/track, 1010 cylinders, total 3947079 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 identifier: 0x00000000

   Device Boot      Start         End      Blocks   Id  System
[root@localhost liveuser]# 
****************************
concering adding the init=option to the kernel , i don't know how ; is it using a live cd or just the installed system ?
The Linux philosophy is 'Laugh in the face of danger'. Oops. Wrong One. 'Do it yourself'. Yes, that's it.
Post Reply