LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 05-20-2016, 09:55 AM   #1
PleaseHelpMeUnderstand
Member
 
Registered: Apr 2016
Posts: 32

Rep: Reputation: 0
Creating new partition


I need to create a partition 15MB in size on the 1st hard drive of my RHEL system

So far I typed:
fdisk /dev/sda <enter>
c <enter>
m <enter>
p <enter>
d <enter>
1 <enter>
n <enter>
p <enter>
1 <enter>
+15M <enter>
+15M <enter>

This is where I am getting hung up. When I try to go back to view the new partition table, I hit p <enter> and I now see /dev/sda1 and this displays:

Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-5221, default 1): +15M
Last cylinder, +cylinders or +size{K,M,G} (2-63, default 63): +15M

Command (m for help): p

Disk /dev/sda: 42.9 GB, 42949672960 bytes
255 heads, 63 sectors/track, 5221 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0005ac32

Device Boot Start End Blocks Id System
/dev/sda1 2 4 24097 83 Linux
/dev/sda2 64 5222 41430016 8e Linux LVM

I know I previously deleted the 1st partition so this new one I created (ID 83) is what I just did but why cant I see the size I input of 15MB? Did I input this incorrectly?

Thanks in advance for any assistance offered.

Last edited by PleaseHelpMeUnderstand; 05-20-2016 at 10:10 AM.
 
Old 05-20-2016, 10:40 AM   #2
dab1414
Member
 
Registered: May 2011
Location: OK, USA
Distribution: Slackware 14.1_64
Posts: 76

Rep: Reputation: 52
Quote:
Originally Posted by PleaseHelpMeUnderstand View Post
I know I previously deleted the 1st partition so this new one I created (ID 83) is what I just did but why cant I see the size I input of 15MB? Did I input this incorrectly?
Well not sure why you entered all those commands, but while running fdisk, afaik, will not show MB in the print screen, just blocks.

Here is how I would have done. ( I use the p alot to verify what i want to do and that is what happened)

Code:
fdisk /dev/sda
p
d <---assuming delete a partion
1 <---deletes partition 1
p 
n
p <---primary partition
1 <---partition 1
return <---use first sector (you tried to tell it to go +15M which Ive never seen that syntax for first sector)
+15M <---last sector for the size you want
p
w
Now if i understood blocks correctly, simply divide that number by 2 and you would get number of 1024 bytes, or kilobytes.

But if you prefer seeing in MB or such, why not try cfdisk instead of fdisk.
 
1 members found this post helpful.
Old 05-20-2016, 11:17 AM   #3
PleaseHelpMeUnderstand
Member
 
Registered: Apr 2016
Posts: 32

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by dab1414 View Post
Well not sure why you entered all those commands, but while running fdisk, afaik, will not show MB in the print screen, just blocks.

Here is how I would have done. ( I use the p alot to verify what i want to do and that is what happened)

Code:
fdisk /dev/sda
p
d <---assuming delete a partion
1 <---deletes partition 1
p 
n
p <---primary partition
1 <---partition 1
return <---use first sector (you tried to tell it to go +15M which Ive never seen that syntax for first sector)
+15M <---last sector for the size you want
p
w
Now if i understood blocks correctly, simply divide that number by 2 and you would get number of 1024 bytes, or kilobytes.

But if you prefer seeing in MB or such, why not try cfdisk instead of fdisk.
Ok thank you. What should I have input for the 1st sector since I put 15M? I didn't understand & honestly was so I just put it for both first and last sectors since I wanted the size to be 15MB.

Ok so wait... are you saying to input NOTHING and just his return for the 1st sector? I don't think I understood you until I read it again

Last edited by PleaseHelpMeUnderstand; 05-20-2016 at 11:19 AM.
 
Old 05-20-2016, 11:37 AM   #4
dab1414
Member
 
Registered: May 2011
Location: OK, USA
Distribution: Slackware 14.1_64
Posts: 76

Rep: Reputation: 52
Quote:
Originally Posted by PleaseHelpMeUnderstand View Post
Ok thank you. What should I have input for the 1st sector since I put 15M? I didn't understand & honestly was so I just put it for both first and last sectors since I wanted the size to be 15MB.

Ok so wait... are you saying to input NOTHING and just his return for the 1st sector? I don't think I understood you until I read it again
yes just hit enter for first sector. there are plenty of guides how to use fdisk, like this
 
1 members found this post helpful.
Old 05-20-2016, 11:49 AM   #5
PleaseHelpMeUnderstand
Member
 
Registered: Apr 2016
Posts: 32

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by dab1414 View Post
yes just hit enter for first sector. there are plenty of guides how to use fdisk, like this
After I did this, I hit w to write the table to disk and exited at which point I received a message that the new partition will be used at the next reboot... only at my desk reboot I now have a black screen (please view attachment) and can't do anything on it
Attached Thumbnails
Click image for larger version

Name:	Capture.JPG
Views:	11
Size:	62.5 KB
ID:	21829  

Last edited by PleaseHelpMeUnderstand; 05-20-2016 at 12:20 PM.
 
  


Reply



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
Resizing Logical Partition, creating new partition thallium Linux - Newbie 5 11-11-2012 08:21 PM
Creating A Partition berkay Linux - Newbie 7 08-14-2004 04:45 PM
Partition mounting/KDE errors after creating Fat32 Partition BertBert Linux - General 1 07-07-2004 10:59 AM
creating new partition before boot partition?? rose_bud4201 Linux - General 17 02-07-2003 12:25 PM
Newbie Installing Debian3 on m68k w/250M Partition Needs help creating swap partition AppleMac Linux - Newbie 2 11-01-2002 08:45 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:04 PM.

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
Open Source Consulting | Domain Registration