From: Sven Joachim on
On 2010-02-26 11:50 +0100, david wrote:

> You don't have a separate /boot partition. You created it in root, it
> looks like. (You shouldn't have done that).

Could you elaborate? True, a separate /boot partition would save some
space on /, but not that much.

> You could create a separate partition for other stuff you have in root, /
> lib for example) and move stuff out of root.

Great idea indeed, have you actually tried that?! Please stop giving
clueless advice that would render the system unbootable if followed.

Sven
From: Nico Kadel-Garcia on
On Feb 26, 5:50 am, david <n...(a)nospam.com> wrote:
> On Thu, 25 Feb 2010 14:50:04 -0800, Ant rearranged some electrons to say:
>
>
>
> > Hello.
>
> > My very old Debian/Linux workstation/desktop box (first installed it on
> > 9/24/2004 and kept it updated daily and only had one reinstall
> > (accidently ran fsck without unmounting a few years ago) -- still
> > amazing that it runs today) is unable to install the latest Kernel
> > (v2.6.32) Debian package due to free limited disk space in / (actually
> > /boot) partition:
>
> > $ df
> > Filesystem           1K-blocks      Used Available Use% Mounted on
> > /dev/hda1               280003    173227     92320  66% / tmpfs        
> >         1297724         0   1297724   0% /lib/init/rw udev              
> >       10240       264      9976   3% /dev tmpfs                  1297724
> >         0   1297724   0% /dev/shm /dev/hda5             14421344  
> > 2759732  10929052  21% /home /dev/hda6              4807056   3620424  
> > 942448  80% /usr /dev/hda7               964500    721228    194276  79%
> > /var /dev/hda8               964500     17676    897828   2% /tmp
> > /dev/hda9              4807056    206076   4356796   5% /usr/local
> > /dev/hda11            47383396  19522168  25454292  44% /extra
> > /dev/hda12              918322     16452    852874   2% /others
>
> > (parted) p
> > Model: ST380011A (ide)
> > Disk /dev/hda: 80.0GB
> > Sector size (logical/physical): 512B/512B Partition Table: msdos
>
> > Number  Start   End     Size    Type      File system     Flags
> >   1      32.3kB  296MB   296MB   primary   ext3 2      296MB   80.0GB
> >   79.7GB  extended 5      296MB   15.3GB  15.0GB  logical   ext3 6    
> >   15.3GB  20.3GB  5001MB  logical   ext3 7      20.3GB  21.3GB  1003MB
> >   logical   ext3 8      21.3GB  22.3GB  1003MB  logical   ext3 9    
> >   22.3GB  27.3GB  5001MB  logical   ext3
> > 12      27.3GB  28.3GB  1003MB  logical   ext3 10      28.3GB  30.7GB
> > 2418MB  logical   linux-swap(v1) 11      30.7GB  80.0GB  49.3GB  logical
> >   ext3
>
> >http://img98.imageshack.us/img98/6544/screenshot1qs.pngfor a screen
> > capture of GParted.
>
> > How can I resize my /'s /boot to get more free disk space without
> > getting another bigger HDD to copy over or reinstalling from scratch?
> > Can I use KNOPPIX v6.2.1 to do it or is it not possible? I used to use
> > PowerQuest's PartitionMagic for DOS and Windows to resize, but I wasn't
> > sure if this method works in Linux too.
>
> > Thank you in advnace. :)
>
> You don't have a separate /boot partition.  You created it in root, it
> looks like.  (You shouldn't have done that).
>
> You could create a separate partition for other stuff you have in root, /
> lib for example) and move stuff out of root.

It's not uncommon. The old "/boot" partition requirement for the the
boot loader to be in the first partition, and that first partition to
be no more than 1024 cylinders (or 8 Gig on a modern drive), and the
segmentation of old, small drives assembled in a stack led to this
common practice to be considered mandatory by many.. But with modern
boot loaders, it's not really necessary.

Segmenting off potentially large and overflowing directories, like /
var/spool/, or /var/www, can protect your basic OS partitions from
being overloaded. But the need for separate /usr, /var, /home, /opt, /
usr/local/, etc. has evaporated with modern hard drives and drive
merging technologies such as RAID and LVM.
From: Nico Kadel-Garcia on
On Feb 26, 6:13 am, Sven Joachim <svenj...(a)gmx.de> wrote:
> On 2010-02-26 11:50 +0100, david wrote:
>
> > You don't have a separate /boot partition.  You created it in root, it
> > looks like.  (You shouldn't have done that).
>
> Could you elaborate?  True, a separate /boot partition would save some
> space on /, but not that much.
>
> > You could create a separate partition for other stuff you have in root, /
> > lib for example) and move stuff out of root.
>
> Great idea indeed, have you actually tried that?!  Please stop giving
> clueless advice that would render the system unbootable if followed.
>
> Sven

Historically, /usr and /var used to be separate partitions in the
early days of UNIX and Linux. For some operating systems, even "/bin"
was not on /: the critical components to boot from tape were stashed
in /etc, and were part of a rather odd bootstrapping procedure to
install an OS.

Not that I recommend oversegmenting, especially because moving aside
kernel modules in /lib can be an *adventure*.
From: Doug Freyburger on
Ant wrote:
>
> My very old Debian/Linux workstation/desktop box ...
> is unable to install the latest Kernel
> (v2.6.32) Debian package due to free limited disk space in / (actually
> /boot) partition:
>
> $ df
> Filesystem 1K-blocks Used Available Use% Mounted on
> /dev/hda1 280003 173227 92320 66% /
> tmpfs 1297724 0 1297724 0% /lib/init/rw
> udev 10240 264 9976 3% /dev
> tmpfs 1297724 0 1297724 0% /dev/shm
> /dev/hda5 14421344 2759732 10929052 21% /home
> /dev/hda6 4807056 3620424 942448 80% /usr
> /dev/hda7 964500 721228 194276 79% /var
> /dev/hda8 964500 17676 897828 2% /tmp
> /dev/hda9 4807056 206076 4356796 5% /usr/local
> /dev/hda11 47383396 19522168 25454292 44% /extra
> /dev/hda12 918322 16452 852874 2% /others
>
> (parted) p
> Model: ST380011A (ide)
> Disk /dev/hda: 80.0GB
> Sector size (logical/physical): 512B/512B
> Partition Table: msdos
>
> Number Start End Size Type File system Flags
> 1 32.3kB 296MB 296MB primary ext3

This is the / mount point. Notice that the extended parition begins
immediately after the end of the primary partition:

> 2 296MB 80.0GB 79.7GB extended
> 5 296MB 15.3GB 15.0GB logical ext3

And that one of the mounted filesystems starts immediately at the
beginning of the extended partition. Checking your mounts 5 is
/dev/hda5 is /home.

You might be able to copy /home to a USB stick or overwrite /others with
it and move /others to somewhere.

The process would be extremely risky because even the slightest typo
will destroy at least one filesystem:

Move the beginning of the extended partition to exactly the beginning of
the current partition 6 dropping the existance of 5. Then expand the
primary partition to exactly fill the gap. Then use "ext2online
/dev/hba1" to expand root.

If that works, and it's very risky and subject to the tiniest typo, it's
also likely to renumber the rest of the partitions inside the extended
partition. hda6 will become hda5 and so on.

You would need to backup your system, boot to a rescue disk, and do this
surgery from that installation kernel.

> 6 15.3GB 20.3GB 5001MB logical ext3
> 7 20.3GB 21.3GB 1003MB logical ext3
> 8 21.3GB 22.3GB 1003MB logical ext3
> 9 22.3GB 27.3GB 5001MB logical ext3
> 12 27.3GB 28.3GB 1003MB logical ext3
> 10 28.3GB 30.7GB 2418MB logical linux-swap(v1)
> 11 30.7GB 80.0GB 49.3GB logical ext3

One of the many purposes of partitioning is to isolate grow within one
partition so it does not effect other partitions. If some user goes
crazy in /home filling it he does not effect any other mount point.

You've just enountered one of the downsides of partitioning. If you
need to resize the overhead can be huge.

I think it's time to acknowledge the inexhorible march of technology and
reinstall fresh with latest versions. Use LVM so future resizing is not
as hard. Leave plenty of space within the disk group unallocated so any
mount point can be exanded on the fly.

The deal with the march of technology - On the one hand you can tell the
pioneers because they are the ones dead in the road killed by the
dangers. On the other hand you can tell laggers when there's a bump and
you see that one of them just got run over and killed and they are now
in the road dead behind you. You just got lapped by technological
advance and you're now dead. Time to upgrade and reinstall.

If you don't want to reinstall yet the next thing to try is to become
progessively more dead by making matters worse and worse. Look for
large files in the / partition not under /boot. Move them to other
locations and replace them with symbolic links. Find old files to
delete without backups. The more you do this the uglier your system
will be, but it is a Bandaid(TM) approach that will work for a while.
Maybe.
From: GangGreene on
Sven Joachim wrote:

> On 2010-02-26 11:50 +0100, david wrote:
>
>> You don't have a separate /boot partition. You created it in root, it
>> looks like. (You shouldn't have done that).
>
> Could you elaborate? True, a separate /boot partition would save some
> space on /, but not that much.
>

Yes encrypted root filesystems

>> You could create a separate partition for other stuff you have in root, /
>> lib for example) and move stuff out of root.
>
> Great idea indeed, have you actually tried that?! Please stop giving
> clueless advice that would render the system unbootable if followed.
>
> Sven

Yes works well

disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00000001

Device Boot Start End Blocks Id System
/dev/sda1 * 1 9561 76798701 7 HPFS/NTFS
/dev/sda2 9562 9624 506047+ fd Linux raid
autodetect
/dev/sda3 9625 9687 506047+ 82 Linux swap
/dev/sda4 9688 60801 410573205 5 Extended
/dev/sda5 9688 10904 9775521 fd Linux raid
autodetect
/dev/sda6 10905 12121 9775521 fd Linux raid
autodetect
/dev/sda7 12122 60801 391022068+ fd Linux raid
autodetect

Disk /dev/sdb: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x056c056c

Device Boot Start End Blocks Id System
/dev/sdb1 * 1 9561 76798701 7 HPFS/NTFS
/dev/sdb2 9562 9624 506047+ fd Linux raid
autodetect
/dev/sdb3 9625 9687 506047+ 82 Linux swap
/dev/sdb4 9688 60801 410573205 5 Extended
/dev/sdb5 9688 10904 9775521 fd Linux raid
autodetect
/dev/sdb6 10905 12121 9775521 fd Linux raid
autodetect
/dev/sdb7 12122 60801 391022068+ fd Linux raid
autodetect

Disk /dev/sdc: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x056c056d

Device Boot Start End Blocks Id System
/dev/sdc1 * 1 9561 76798701 7 HPFS/NTFS
/dev/sdc2 9562 9624 506047+ fd Linux raid
autodetect
/dev/sdc3 9625 9687 506047+ 82 Linux swap
/dev/sdc4 9688 60801 410573205 5 Extended
/dev/sdc5 9688 10904 9775521 fd Linux raid
autodetect
/dev/sdc6 10905 12121 9775521 fd Linux raid
autodetect
/dev/sdc7 12122 60801 391022068+ fd Linux raid
autodetect
scrat(a)slack-x86:~$

The boot partition is /dev/sda2 /dev/sdb2 /dev/sdc2 RAID 1