Linux - HardwareThis forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with 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.
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.
Sorry that I posted this here, but I didn't know where else this should go..
I have an 80GB hard disk with Fedora Core on /dev/hda1, the swap partition on another primary partition, an extended partition (Fat32), and thus only one primary partition left.
Now I want to install either Solaris or FreeBSD on that last primary partition. Both of them have to be installed on primary partitions, so I suppose I'll need another primary partition to be used as a swap partition.
My question is: Is it possible to "move" the Linux swap partition to another position on the hard disk? I was thinking of creating a new partition on the extended partition and using that as my new Linux swap, and formatting the old one on the primary partition to use as a Solaris/BSD swap partition. Is that possible without reinstalling Fedora?
Can be done. You must have an really big swap partition to install another OS on it. How big is your swap? Do fdisk -l and show that here, lets see what you have before you get started.
Anyway, swap can be on the extended. Use mkswap /dev/<whatever>, then swapon. man both for more details. Then make changes in /etc/fstab and reboot.
Check your /etc/fstab and you will see where the swap is defined:
Code:
/dev/hdb2 swap swap pri=42 0 0
You don't need to "move" any data that is on there. Just unmount the swap partition and mount the new one (man swapon, man swapoff). The man files are so straightforward that I think you can take it from there even if you're a beginner, since you appear to understand partitions. Also FYI, you can also create a file and mount the file for swap space if you prefer. You can even share a swap file with Windows if you're feeling adventurous, and if Windows is configured to used a fixed size swap file.
# This file is edited by fstab-sync - see 'man fstab-sync' for details
LABEL=/ / ext3 defaults 1 1
/dev/devpts /dev/pts devpts gid=5,mode=620 0 0
/dev/shm /dev/shm tmpfs defaults 0 0
/dev/proc /proc proc defaults 0 0
/dev/sys /sys sysfs defaults 0 0
LABEL=´$ÁÁ:ñO
 swap swap defaults 0 0
/dev/hda5 /home/bass/A vfat noauto,utf8,users,exec,umask=000 0 0
/dev/hda6 /home/bass/B vfat noauto,utf8,users,exec,umask=000 0 0
/dev/hda7 /home/bass/MP3s vfat noauto,utf8,users,exec,umask=000 0 0
/dev/fd0 /media/floppy auto pamconsole,exec,noauto,managed 0 0
/dev/hdc /media/cdrecorder auto pamconsole,exec,noauto,managed 0 0
/dev/hdb /media/cdrom auto pamconsole,exec,noauto,managed 0 0
I have no idea what those strange symbols mean or why they're there. Anyway if I create a swap partition using QTParted or whatever on (let's say) /dev/hda7 , I suppose the fstab entry should be:
Code:
/dev/hda7 swap swap defaults 0 0
Am I right? And BTW, I have a 1GB swap partition (because of 512 Ram)
Yes you have the general idea, You're not going to do much with 1g for an OS. If you have room, maybe reorder a few things. What does fdisk -l and df -h show?
Disk /dev/hda: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/hda1 * 1 1145 9197181 83 Linux
/dev/hda2 1276 7956 53665132+ f W95 Ext'd (LBA)
/dev/hda3 1146 1275 1044225 82 Linux swap / Solaris
/dev/hda5 1276 2540 10161081 b W95 FAT32
/dev/hda6 2541 4823 18338166 b W95 FAT32
/dev/hda7 4824 7564 22017051 b W95 FAT32
That's the fdisk entry
I won't need any partition rearranging on the extended partition, I have 3 gb of unpartitioned space so I'll create the new swap there and add the rest to another partition.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.