I currently have 2 320GB SATA hard disks in my Slackware 13/64 bit system and my second hard drive has a single partition mounted on /data which is backups of windows programs so when doing a re-install of windows we can get the programs locally, as well as user home directories (so /home is mapped to /data/home/username). The first hard drive has multiple partitions. The primary partitions are swap partitions (sda1 - sda3), sda4 is an extended partition sda5 is another swap partition and sda6 is the root file system /. In a few weeks I am planning on getting a 1TB or greater drive that will replace the sdb1 drive and it will be formatted and put in another system in the house after the data is moved. What I want to do is on sda delete partition sda1 - sda3 (which are swap partitions) and make it 1 swap, BUT I want to avoid re-doing the system if it can be done, so when creating the new partition I would start at position 1 and end where sda3 ends and then format it as swap. Will this work without having to re-do the system (will include fdisk, fstab and so on of sda below) and are there anything I should be careful of?
I know I stuck with sda5 being a swap unless I can find another use for a 5GB partitions and my numbering of the partitions will be off and will need to adjust fstab to mach changes. When done I would have sda1 that starts at 1 and ends at 1692 then sda4 - sda6 would remain unchanged.Code:root@krazy:~# fdisk /dev/sda The number of cylinders for this disk is set to 38913. There is nothing wrong with that, but this is larger than 1024, and could in certain setups cause problems with: 1) software that runs at boot time (e.g., old versions of LILO) 2) booting and partitioning software from other OSs (e.g., DOS FDISK, OS/2 FDISK) Command (m for help): p Disk /dev/sda: 320.0 GB, 320072933376 bytes 255 heads, 63 sectors/track, 38913 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Disk identifier: 0xbb1a3e58 Device Boot Start End Blocks Id System /dev/sda1 1 654 5253223+ 82 Linux swap /dev/sda2 655 1308 5253255 82 Linux swap /dev/sda3 1309 1962 5253255 82 Linux swap /dev/sda4 1963 38913 296808907+ 5 Extended /dev/sda5 1963 2616 5253223+ 82 Linux swap /dev/sda6 2617 38913 291555621 83 Linux Command (m for help):
Code:root@krazy:~# cat /etc/fstab /dev/sda1 swap swap defaults 0 0 /dev/sda2 swap swap defaults 0 0 /dev/sda3 swap swap defaults 0 0 /dev/sda5 swap swap defaults 0 0 /dev/sda6 / ext4 defaults 1 1 /dev/sdb1 /data ext4 defaults 1 2 #/dev/cdrom /mnt/cdrom auto noauto,owner,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 tmpfs /dev/shm tmpfs defaults 0 0 root@krazy:~# root@krazy:~# df -hT Filesystem Type Size Used Avail Use% Mounted on /dev/root ext4 274G 8.7G 252G 4% / /dev/sdb1 ext4 294G 116G 164G 42% /data tmpfs tmpfs 2.0G 0 2.0G 0% /dev/shm



Reply With Quote

I know, but that's how it is 

Bookmarks