Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 11-12-2017, 12:31 PM   #1
LQ Newbie
Registered: Oct 2017
Posts: 12

Rep: Reputation: Disabled
Question Trouble setting up swap partition using fdisk, Please help!

Hello all,

I am fairly new to Linux in general and this is my first attempt at installing Slackware. I am really interested in this distro especially and would rather install slackware over any other right now. I am having trouble setting up the partitions. All I want is 2 partitions (I'm a newbie and want to keep it as simple as possible), one 8Gb swap partition and make the remainder of my 500Gb hard drive into an ext4 filesystem partition.
I started by using fdisk to erase all previous partitions so I can start with a clean drive. Then I used fdisk to make an 8Gb partition and another partition that takes up the remainder of the hard drive(457.8Gb). By default they are both created as "Linux Filesystem". Obviously I want to make the 8Gb portion into a "Linux swap partition". I have used the "t" command in fdisk which allows you to enter a Hex code to change the filesystem type. The Hex code for a swap partition is 82, and linux filesystem is 83.
However, when I use fdisk and enter 82 when prompted for the Hex code, I get the message:

"Type of partition 1 is unchanged: Linux filesystem"

So, I am finding it impossible to make the 8Gb partition into a swap partition using fdisk. Is there another way to change the partition type using fdisk or another partitioning program?

Any suggestions are greatly appreciated,
Best Regards,
Old 11-12-2017, 12:56 PM   #2
Senior Member
Registered: Oct 2005
Location: Horgau, Germany
Distribution: Manjaro KDE, Win 10
Posts: 2,197

Rep: Reputation: 164Reputation: 164
You can partition the disk with fdisk.
After that, you have to create the filesystem with mke2fs .
Old 11-12-2017, 01:16 PM   #3
LQ Guru
Registered: Dec 2011
Distribution: Slackware, MX 18
Posts: 9,484
Blog Entries: 15

Rep: Reputation: 1174Reputation: 1174Reputation: 1174Reputation: 1174Reputation: 1174Reputation: 1174Reputation: 1174Reputation: 1174Reputation: 1174
When I install Slackware I create the swap partition first.
Than allocate the rest of the drive to the ext 4 / journaling file system.

I found this video to be very helpful for installing Slack:-

Good luck with your fresh install and enjoy!

Last edited by Ztcoracat; 11-12-2017 at 01:17 PM.
Old 11-12-2017, 01:30 PM   #4
LQ Newbie
Registered: Nov 2017
Location: Italia
Distribution: Slackware
Posts: 8

Rep: Reputation: 7
You can use cfdisk(graphics mode). Make your 8 GB partition and then, in type menu, select 82.

...My english is too bad, I'm sorry!

Last edited by BobRock; 11-14-2017 at 01:00 AM.


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
setting up new RH server, trouble figuring out partitions (naive about fdisk) eje4 Linux - Newbie 1 07-27-2009 07:21 PM
Is it okay to alter swap partition with fdisk after FC4 install? Dimension User Fedora 6 09-19-2005 06:21 PM
How to make a swap partition with mac-fdisk? PsychoSync Linux - Software 1 04-03-2005 06:58 PM
Setting up my swap partition... fury Linux - Newbie 2 10-01-2003 01:45 PM
Setting up swap partition for new installation tempyyyst Linux - Newbie 5 09-28-2003 10:22 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:26 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration