LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 11-30-2006, 05:22 AM   #1
gbowden
Member
 
Registered: Dec 2003
Location: Spain
Distribution: Slackware 14.1 64bit - multilib
Posts: 148

Rep: Reputation: 28
Moving /boot to new partition?


Will it be safe to move /boot to another partition as long as I update the /etc/fstab?

Will I have to change any setting in LILO?

fstab:

Code:
/dev/sda3        swap             swap        defaults         0   0
/dev/sda1        /                ext3        defaults         1   1
/dev/sda5        /home            ext3        defaults         1   2
/dev/hda1        /windows-c       ntfs        ro,users,utf8,umask=0222  1   0
/dev/cdrom       /mnt/cdrom       auto        noauto,users,ro  0   0
/dev/fd0         /mnt/floppy      auto        noauto,owner     0   0
devpts           /dev/pts         devpts      gid=5,mode=620   0   0
proc             /proc            proc        defaults         0   0
//PRIVATE-E86712E/documents /officeb smbfs
username=root,password=*,users,uid=gbowden,gid=users 0 0
lilo.conf:

Code:
# LILO configuration file
# generated by 'liloconfig'
#
# Start LILO global section
boot = /dev/sda
compact        # faster, but won't work on all systems.
prompt
timeout = 300
read-only
# VESA framebuffer console @ 1024x768x256
vga = 773
# 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
# ramdisk = 0     # paranoia setting
# End LILO global section
# Linux bootable partition config begins
image = /boot/vmlinuz-ide-2.4.33.3
  root = /dev/sda1
  label = Linux_2.4
  read-only # Non-UMSDOS filesystems should be mounted read-only for checking
# Linux bootable partition config ends
# Linux bootable partition config begins
image = /boot/vmlinuz-generic-2.6.17.13
  root = /dev/sda1
  label = Linux_2.6
  initrd = /boot/initrd.2.6.w.gz
# Linux bootable partition config ends
# Linux bootable partition config begins
image = /boot/vmlinuz-generic-smp-2.6.17.13
  root = /dev/sda1
  label = Linux_2.6_SMP
  initrd = /boot/initrd.2.6.smp.gz
# Linux bootable partition config ends
# Linux bootable partition config begins
image = /boot/vmlinuz-generic-smp-2.6.18.2
  root = /dev/sda1
  label = Linux_2.6_SMP2
# Linux bootable partition config ends
# Windows bootable partition config begins
other = /dev/hda1
  label = Windows
  table = /dev/hda
# Windows bootable partition config ends
 
Old 11-30-2006, 07:21 AM   #2
gegechris99
Member
 
Registered: Oct 2005
Location: France
Distribution: Slackware 14.2 64bit
Posts: 917
Blog Entries: 5

Rep: Reputation: 148Reputation: 148
When I installed Gentoo some time ago, I used a different partition for /boot.

Here's the Gentoo Handbook that shows that is possible:

http://www.gentoo.org/doc/en/handboo...?part=1&chap=8

So I guess that yes, you can move /boot to another partition of your drive (/dev/sda in your case) and update /etc/fstab accordingly. I'm not sure if /boot must be the first partition in your drive (as indicated in Gentoo handbook).

I don't think that lilo.conf need to be updated: you specify in it the drive to boot (/dev/sda) and the physical location of your "/" directory (/dev/sda1).
 
Old 11-30-2006, 07:49 AM   #3
gbowden
Member
 
Registered: Dec 2003
Location: Spain
Distribution: Slackware 14.1 64bit - multilib
Posts: 148

Original Poster
Rep: Reputation: 28
Ok, thanks. I will try it and see and post back if I have any problems.
 
Old 11-30-2006, 07:54 AM   #4
TSquaredF
Member
 
Registered: Dec 2005
Location: "The South Coast of Texas"
Distribution: Slackware64-current
Posts: 538

Rep: Reputation: Disabled
I have a 10 MB partition that I use for /boot. In my case it is hda1, so I don't know if it can be other than the first partition. The kernel, sysmap, etc are in the top of this directory. I use GRUB, so the GRUB files are in /dev/hda1/grub. My menu.lst line for this is:
Quote:
kernel (hd0,0)/vmlinuz root=/dev/hda2 ro
This arrangement works well for me.
Regards,
Bill
 
Old 11-30-2006, 10:20 AM   #5
gbowden
Member
 
Registered: Dec 2003
Location: Spain
Distribution: Slackware 14.1 64bit - multilib
Posts: 148

Original Poster
Rep: Reputation: 28
It Works!

Everything went well I now have a /boot partition mounted as /dev/sda4 on /boot.

My new fstab:

Code:
/dev/sda3        swap             swap        defaults         0   0
/dev/sda1        /                ext3        defaults         1   1
/dev/sda5        /home            ext3        defaults         1   2
/dev/sda4        /boot            ext3        defaults         1   3
/dev/hda1        /windows-c       ntfs        ro,users,utf8,umask=0222  1   0
/dev/cdrom       /mnt/cdrom       auto        noauto,users,ro  0   0
/dev/fd0         /mnt/floppy      auto        noauto,owner     0   0
devpts           /dev/pts         devpts      gid=5,mode=620   0   0
proc             /proc            proc        defaults         0   0
//PRIVATE-E86712E/documents /officeb smbfs  username=root,password=*,users,uid=gbowden,gid=users 0 0
df output:

Code:
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda1              91G   53G   33G  62% /
/dev/sda5              82G  6.1G   71G   8% /home
/dev/sda4             7.8G  141M  7.2G   2% /boot
/dev/hda1              38G   17G   21G  45% /windows-c
//PRIVATE-E86712E/documents
                       20G   13G  6.2G  68% /officeb
Regards,

Greg

Last edited by gbowden; 11-30-2006 at 10:24 AM.
 
Old 11-30-2006, 10:47 AM   #6
gegechris99
Member
 
Registered: Oct 2005
Location: France
Distribution: Slackware 14.2 64bit
Posts: 917
Blog Entries: 5

Rep: Reputation: 148Reputation: 148
Glad to hear that.

But do you really need a 10Gb /boot partition ? That's a lot of kernels !!!

If you don't intend to experiment with many kernels, you should be OK with a 500M partition.
 
Old 11-30-2006, 10:56 AM   #7
b0uncer
LQ Guru
 
Registered: Aug 2003
Distribution: CentOS, OS X
Posts: 5,131

Rep: Reputation: Disabled
Quote:
If you don't intend to experiment with many kernels, you should be OK with a 500M partition.
Wow you're talking big. I remember it was not that long ago when a RedHat installer asked me to create a /boot of at least 16MB. When did we go to gigabytes?

I think 500 megs is quite a big too. What the heck is eating over 140 megabytes on your /boot? I'd check out, since in my own experience you don't really need that much space (well if you have a few dozens of fully equipped, every-module-installed kernels, then yeah), it's just pure waste having over 7 gigabytes of unused space on /boot.
 
Old 11-30-2006, 11:01 AM   #8
gegechris99
Member
 
Registered: Oct 2005
Location: France
Distribution: Slackware 14.2 64bit
Posts: 917
Blog Entries: 5

Rep: Reputation: 148Reputation: 148
Quote:
Wow you're talking big. I remember it was not that long ago when a RedHat installer asked me to create a /boot of at least 16MB. When did we go to gigabytes
Yes a 500MB /boot partition is big but I looked at the lilo.conf file and there were 4 kernels.

So maybe gbowden wants to do some testing and I wanted to recommend him a safe limit.
 
Old 11-30-2006, 11:05 AM   #9
gbowden
Member
 
Registered: Dec 2003
Location: Spain
Distribution: Slackware 14.1 64bit - multilib
Posts: 148

Original Poster
Rep: Reputation: 28
Post

I don't know what's taking up 141 MB of data.

Code:
16:59:54 root@gbnet:/boot# ls -lah
total 11M
drwxr-xr-x  5 root root 4.0K 2006-11-30 16:27 ./
drwxr-xr-x 22 root root 4.0K 2006-11-30 16:10 ../
drwxr-xr-x  8 root root 4.0K 2006-11-16 21:22 2.4.33.3/
lrwxrwxrwx  1 root root   37 2006-11-30 17:05 README.initrd -> /usr/doc/mkinitrd-1.0.1/README.initrd
lrwxrwxrwx  1 root root   32 2006-11-30 17:05 System.map -> System.map-generic-smp-2.6.17.13
-rw-r--r--  1 root root 695K 2006-09-09 08:14 System.map-generic-2.6.17.13
-rw-r--r--  1 root root 707K 2006-10-01 00:20 System.map-generic-smp-2.6.17.13
-rw-r--r--  1 root root 762K 2006-11-18 14:05 System.map-generic-smp-2.6.18.2
-rw-r--r--  1 root root 615K 2006-09-01 08:51 System.map-ide-2.4.33.3
-rw-r--r--  1 root root  512 2006-11-16 18:57 boot.0800
lrwxrwxrwx  1 root root   28 2006-11-30 17:05 config -> config-generic-smp-2.6.17.13
-rw-r--r--  1 root root  62K 2006-09-09 08:14 config-generic-2.6.17.13
-rw-r--r--  1 root root  61K 2006-10-01 00:20 config-generic-smp-2.6.17.13
-rw-r--r--  1 root root  64K 2006-11-18 14:05 config-generic-smp-2.6.18.2
-rw-r--r--  1 root root  41K 2006-09-01 08:51 config-ide-2.4.33.3
-rw-r--r--  1 root root 5.0K 2006-08-08 07:34 diag1.img
drwxr-xr-x  8 root root 4.0K 2006-11-16 22:43 initrd-tree/
-rw-------  1 root root 375K 2006-11-16 21:33 initrd.2.6.gz
-rw-------  1 root root 467K 2006-11-16 22:46 initrd.2.6.smp.gz
-rw-------  1 root root 453K 2006-11-16 22:16 initrd.2.6.w.gz
-rw-r--r--  1 root root 4.1K 2006-11-18 14:10 lilo.out
drwx------  2 root root  16K 2006-11-30 17:03 lost+found/
-rw-------  1 root root  76K 2006-11-30 16:27 map
lrwxrwxrwx  1 root root   29 2006-11-30 17:05 vmlinuz -> vmlinuz-generic-smp-2.6.17.13
-rw-r--r--  1 root root 1.7M 2006-09-09 08:14 vmlinuz-generic-2.6.17.13
-rw-r--r--  1 root root 1.8M 2006-10-01 00:20 vmlinuz-generic-smp-2.6.17.13
-rw-r--r--  1 root root 1.9M 2006-11-18 14:04 vmlinuz-generic-smp-2.6.18.2
-rw-r--r--  1 root root 1.3M 2006-09-01 08:51 vmlinuz-ide-2.4.33.3
du only shows 12 megs used:

Code:
17:02:28 root@gbnet:~# du -sh /boot/
13M     /boot/
The reason I used 7 GB for the /boot partition is because that's the space I had left when resising my swap partition to the nearest MB.

Is there a way to add 7 GB of free space on an existing partition like /home ?

Regards,

Greg
 
Old 11-30-2006, 04:21 PM   #10
gegechris99
Member
 
Registered: Oct 2005
Location: France
Distribution: Slackware 14.2 64bit
Posts: 917
Blog Entries: 5

Rep: Reputation: 148Reputation: 148
You may have some junk data from your old swap partition but I don't know how it's possible.

Some programs for resizing partitions exist as "parted" that is available in the extra/ directory of Slackware 11.0.

But I haven't tried so you'd better first read the documentation on their site.
 
Old 11-30-2006, 04:22 PM   #11
TNWestTex
Member
 
Registered: May 2006
Location: Tennessee
Distribution: current, rawhide
Posts: 87

Rep: Reputation: 16
Simple way in /boot do
Code:
mkdir stuff
cd /home/user
ln -sf /boot/stuff stor
otherwise you have to check how the partitions are physically on the disk. The /boot partition can be shrunk easily using filesize. A new 100 to 200M partition created at the end of the free space and /boot copied to it and the old /boot deleted. The free space created that way can be added to the partition preceding it on the drive whatever that may be. Re run lilo at the end to get everything set properly.
 
Old 11-30-2006, 04:36 PM   #12
gbowden
Member
 
Registered: Dec 2003
Location: Spain
Distribution: Slackware 14.1 64bit - multilib
Posts: 148

Original Poster
Rep: Reputation: 28
Resising /boot.

I used QTParted to resize and then format the free space of the swap partition.

I then copied the old data from the previous /boot partition to the new /boot partition.

Would it be better if I resize the new /boot partition to about 100 megs then use the spare space to make a /tmp partition?

Then I would be able add the noexec in the fstab to the /tmp partition and hopefully add some security.

Regards,

Greg
 
Old 12-01-2006, 04:34 AM   #13
gegechris99
Member
 
Registered: Oct 2005
Location: France
Distribution: Slackware 14.2 64bit
Posts: 917
Blog Entries: 5

Rep: Reputation: 148Reputation: 148
If you don't plan to add other kernels, you can do with a 50Mb /boot partition.

As for the remaining free partition from your old swap partition, it's up to you to decide what to do with it (OK, I think you know that). So here's a HOW-TO to help you decide:

http://tldp.org/HOWTO/Partition/

Paragraph 4 may be useful to you
 
Old 12-01-2006, 04:43 AM   #14
gbowden
Member
 
Registered: Dec 2003
Location: Spain
Distribution: Slackware 14.1 64bit - multilib
Posts: 148

Original Poster
Rep: Reputation: 28
Thanks for all your help.

I'm going to make a /tmp partition from the left over 7 GB.

Regards,

Greg
 
  


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
[SOLVED] Moving /boot to separate partition and using 'grub' to boot eldiener Linux - General 4 11-28-2006 09:01 PM
moving /boot to another partition CloudBuilder Ubuntu 1 10-30-2006 02:50 PM
Question about moving /boot partition to new drive rogun64 Linux - Newbie 1 02-05-2006 08:17 AM
moving files from windows partition to linux partition M O L8ingN2dust Linux - Newbie 11 01-08-2006 10:11 PM
moving a boot partition poblano Linux - General 2 05-28-2003 10:18 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 06:40 AM.

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