Slackware This Forum is for the discussion of Slackware Linux.
|
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
|
04-03-2006, 03:51 AM
|
#1
|
Member
Registered: Jan 2006
Location: Australia
Distribution: Fedora, Slackware, RHEL, AIX, HP-UX
Posts: 358
Rep:
|
Best way to Resize Linux partition ? + kernel remove question
I would like to increase the size of my Linux partition. I made the mistake of doing it in partition magic in windows once which Linux wasnt very happy about at all... What is the best way to do it on a Dual Boot system With Linux and Windows XP.
XP has both NTFS and Fat32 Partitions...
Also, the updating ldconfig when my machine boots.. It seems to take longer and longer.. Are links to each kernel i have compiled listed in this thing? What is the best way to remove a kernel once i am done with it or have progressed further.
If i simply delete /usr/src/linux-2.6.xx will there still be links to this everywhere in the system?
Thanks in advance
|
|
|
04-03-2006, 04:33 AM
|
#2
|
Senior Member
Registered: Feb 2006
Location: Siberia
Distribution: Slackware & Slamd64. What else is there?
Posts: 1,705
Rep:
|
Quote:
Originally Posted by -=Graz=-
I would like to increase the size of my Linux partition. I made the mistake of doing it in partition magic in windows once which Linux wasnt very happy about at all... What is the best way to do it on a Dual Boot system With Linux and Windows XP.
XP has both NTFS and Fat32 Partitions...
|
There are two easy ways to do this. Basically, you make a backup and then restore it in the larger partition. It just depends on how you want to do the backup. You can use tar (and gzip or bzip2) or partimage, or something else. If you have your linux mounted from more than one partition, you have to make multiple backups.
1. make a backup
2. delete the partition with fdisk
3. create a new (bigger) partition with fdisk
4. make a filesystem (mkfs, mkreiserfs, etc)
5. restore the backup into the partition
You should have a live CD if you are going to do anything with linux. Kanotix is very good, it has many tools, including partimage. Partimage is a console app which you can use to make backups and restore them (but they always have to be restored in a partition which is at least as big as the one you made the backup from. Sometimes this isn't good. If you had a 10G partition but were only using 5G, you can restore this partimage backup in a 6G partition)
Or you could just do
Code:
tar -cvjf mysystem.tar.bz2 /
and then when you have your new partition created
Code:
tar -xvjf mysystem.tar.bz2
Quote:
Originally Posted by -=Graz=-
Also, the updating ldconfig when my machine boots.. It seems to take longer and longer.. Are links to each kernel i have compiled listed in this thing? What is the best way to remove a kernel once i am done with it or have progressed further.
If i simply delete /usr/src/linux-2.6.xx will there still be links to this everywhere in the system?
Thanks in advance
|
The sources don't cause any problems. And nothing should be linked to source. ldconfig updates a cache of shared libraries. If it's taking a long time, you can change the invocation to run as a background process by adding & to the invocation and then your start up will not wait for the cache to be built before continuing.
|
|
|
04-03-2006, 10:04 AM
|
#3
|
Senior Member
Registered: Oct 2005
Location: Lithuania
Distribution: Hybrid
Posts: 2,247
Rep:
|
|
|
|
04-04-2006, 11:55 AM
|
#4
|
Member
Registered: Jan 2006
Location: Australia
Distribution: Fedora, Slackware, RHEL, AIX, HP-UX
Posts: 358
Original Poster
Rep:
|
randux - thanks for your reply. This is a great help!
I had no idea that this would be the approach to take. I have quite a few bootable linux discs, one of which i think is deigned for this type thing now i think about it...
well i only have a 8 GB partition reserved for linux at the moment. I think i will delete it and create a 20GB one or 2 x 10GB ones...
I will have to gove this a go over the next couple of days but looks good to me!
thanks again, i will post the outcome -
|
|
|
04-04-2006, 12:00 PM
|
#5
|
Member
Registered: Jan 2006
Location: Australia
Distribution: Fedora, Slackware, RHEL, AIX, HP-UX
Posts: 358
Original Poster
Rep:
|
Quote:
Originally Posted by Alien_Hominid
|
Oh this looks cool... I might grab a copy now and check it out...
Thanks!!
|
|
|
04-04-2006, 12:05 PM
|
#6
|
Senior Member
Registered: Oct 2005
Location: Lithuania
Distribution: Hybrid
Posts: 2,247
Rep:
|
There is also qtparted and their father parted.
|
|
|
04-04-2006, 12:18 PM
|
#7
|
Member
Registered: Jan 2006
Location: Australia
Distribution: Fedora, Slackware, RHEL, AIX, HP-UX
Posts: 358
Original Poster
Rep:
|
Quote:
Originally Posted by Alien_Hominid
|
okthen - i just got:
gtkmm-2.8.0
parted-1.6.25.1
gparted-0.2.3
Looks like there is anther library i will need as well... after doing a ./configure on each. I think i have uninstalled a bunch of Gnome stuff coz i have been using kDE.
I might just go for the tarballing and manuall delete/create of partition at this stage..
It is 2am right now and i gotta get up for work at 6am so i had best forget about this for the day
|
|
|
04-04-2006, 12:38 PM
|
#8
|
Senior Member
Registered: Oct 2005
Location: Lithuania
Distribution: Hybrid
Posts: 2,247
Rep:
|
If you have kde, use qtparted then.
|
|
|
04-04-2006, 10:49 PM
|
#9
|
Member
Registered: Jan 2006
Location: Australia
Distribution: Fedora, Slackware, RHEL, AIX, HP-UX
Posts: 358
Original Poster
Rep:
|
Quote:
Originally Posted by Alien_Hominid
If you have kde, use qtparted then.
|
Thanks Alien Hominid, i might have a look at this when i get home tonight.. Pretty tired though after staying up so late last night
Cheers, G
|
|
|
04-07-2006, 11:49 AM
|
#10
|
Member
Registered: Jan 2006
Location: Australia
Distribution: Fedora, Slackware, RHEL, AIX, HP-UX
Posts: 358
Original Poster
Rep:
|
okay i managed to foul up my whole system trying to do this... LOL...
did not have enough space on my linux partition to dump the file so i tried to create some more space in partition magic.... Oh my what a mess... the names of /dev/hdx all changed and fstab was wrong as well as lilo..
Managed to boot into SLAX live CD and use #cfdisk to delete the new partition i created. i then had to go back into fstab and change all the values as the kernel wrote a bunch of botch stuff in there on the failed boot..
I have since removed an old 30gb hd from a laptop and chucked it in a USB2 external caddy.. created a 15GB fat32 parition on there.
#mount /dev/sda1 /mnt/fat32 vfat
#tar -cvjf /mnt/fat32/mysystem.tar.gz /
Seems to be working pretty good.... (except it also archived the /mnt/fat32 dir.... LOL) <- only had 35MB file in there at the time though. Had to also #umount all other drives first as it tried to add my ntfs volumes into the tarball too .. hehe...
Oh i made a bit of a mess of this... But i cant really go wrong from here.. I was very lucky to salvage the system
I also downloaded the x86 Linux system recovery boot cd, but qparted did not want to work...
This time i am going to build the system so i can do proper maintenance in the future. I have a Dell laptop and there were 2 x other primary partitions with Dell system recovery stuff in them too - which made things worse..
Thanks for your help though, seems to be working
|
|
|
04-07-2006, 12:05 PM
|
#11
|
Senior Member
Registered: Oct 2005
Location: Lithuania
Distribution: Hybrid
Posts: 2,247
Rep:
|
Quote:
Originally Posted by -=Graz=-
Seems to be working pretty good.... (except it also archived the /mnt/fat32 dir.... LOL) <- only had 35MB file in there at the time though.
|
That's good for you.
|
|
|
04-16-2006, 02:30 AM
|
#12
|
Member
Registered: Jan 2006
Location: Australia
Distribution: Fedora, Slackware, RHEL, AIX, HP-UX
Posts: 358
Original Poster
Rep:
|
i ended up using parted to do this which worked perfectly.... and compressed 7GB down to 1.9GB with the standard options. I then used fdisk to delete/re-create the new partition. i have a problem now however with the filesystem. it thinks it is still 9GB instead of 19GB. I did not use 'mkf s' to re-create the filesystem.. i just created a partition of 'type' - linux in fdisk..
I tried to use parted resize option and it doesnt seem to happy... says i have a 'strange' ext2 fileystem LOL..
|
|
|
11-26-2006, 04:29 AM
|
#13
|
LQ Newbie
Registered: Aug 2006
Posts: 3
Rep:
|
Hi
Was resizing "/" and "/home". Have Suse 10.1
- downloaded Knoppix Live cd
- started Knoppix, did partimage to backup / and /home
- deleted both partitions
- created new / and new /home partitions
- restarted
- did mkreiserfs
- restored data to / and /home using partimage
- modified /etc/fstab to reflect new partitions
- rebooted from HDD
- started Suse.
Questions:
Why df -h still shows old space
I tried to go to software installation to add some packages and still got message that don't have enough space
- when I go to LVM or Partitioner - they show the right space for / and /home
What I did wrong?
|
|
|
11-26-2006, 11:39 PM
|
#14
|
Member
Registered: Jan 2004
Location: Trinidad & Tobago
Distribution: Slackware
Posts: 317
Rep:
|
weee this sounds like fun. I was doing something like this a earlier this year http://www.linuxquestions.org/questi...move+partition
It may be an interesting read for you.
WRT your senario, seeing that (1) you have your filesystems archived on another hdd(2) parted is bitching, why not just delete like mad and recreate new partitions? Make sure your create a filesystem this time like 'mkreiserfs /dev/hdX' if your have ide or sda for sata, Before you start untaring.
|
|
|
11-27-2006, 10:57 AM
|
#15
|
Amigo developer
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,928
|
I've rescued 2 other programs from oblivion which are based on parted:
http://distro.ibiblio.org/pub/linux/...s/nparted-0.2/
http://distro.ibiblio.org/pub/linux/...ts/gtk-parted/
These both use an earlier version of libparted. I've configured nparted so that libparted is linked statically -still have that to do for gtk-parted although I'm more interested in updating them both to use later versions of libparted. You probably won't find these programs anywhere else...
|
|
|
All times are GMT -5. The time now is 02:42 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|