Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
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.
I have a physical drive of about 40GB, I want to create a partition of 10GB with FDISK on this drive.
This is the fdisk -l output:
Code:
[root@localhost tools]# fdisk -l
Disk /dev/hda: 16.1 GB, 16106127360 bytes
255 heads, 63 sectors/track, 1958 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/hda1 * 1 13 104391 83 Linux
/dev/hda2 14 1958 15623212+ 8e Linux LVM
Disk /dev/hdb: 42.9 GB, 42949672960 bytes
16 heads, 63 sectors/track, 83220 cylinders
Units = cylinders of 1008 * 512 = 516096 bytes
Device Boot Start End Blocks Id System
/dev/hdb1 1 10000 5039968+ 83 Linux
I issue the fdsik /dev/hdb command, and enter n (for new partition) but I am not sure about the first and last cylinder specification for a partition of 10GB.
I issue the fdsik /dev/hdb command, and enter n (for new partition) but I am not sure about the first and last cylinder specification for a partition of 10GB.
I issue the fdsik /dev/hdb command, and enter n (for new partition) but I am not sure about the first and last cylinder specification for a partition of 10GB.
If you want 10.0 GB in operating system math (10 * 1024 * 1024 * 1024 bytes = 10.0 GB), use this math to calculate the number of cylinders:
Distribution: Debian 8 Cinnamon/Xfce/gnome classic Debian live usb
Posts: 508
Rep:
Actually, I'm having a similar problem.
I need to know the 'last cylinder' number to create the size of my partition.
I have a 160gb hdd and I want to create a 40gb partition for a linux distro.
I am using the fdisk cmd but I don't know what the 'last cylinder' number should be.
The 'start cylinder' is simple. I simply hit ENTER and the partition will begin from the previous partition.
I can't find a site where something as important as the partition size is simplified. 40gb is a nice neat number. But the corresponding 'last cylinder' number is completely crazy.
Can someone help please?
fdisk /dev/sda
Code:
root@debian:/home/user# fdisk /dev/sda
Command (m for help): p
Disk /dev/sda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders, total 312581808 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x9b3c9b3c
Device Boot Start End Blocks Id System
/dev/sda1 * 63 312560639 156280288+ 7 HPFS/NTFS/exFAT
Higgsboson,
You don't want to use fdisk. I assume you want to keep the existing windows OS. You can either use the windows disk management tool or gparted to shrink sda1 to 120 GB then let the installer create the additional partitions.
Distribution: Debian 8 Cinnamon/Xfce/gnome classic Debian live usb
Posts: 508
Rep:
Quote:
Originally Posted by michaelk
Higgsboson,
You don't want to use fdisk. I assume you want to keep the existing windows OS. You can either use the windows disk management tool or gparted to shrink sda1 to 120 GB then let the installer create the additional partitions.
Sorry, I should've supplied more info.
I have a seperate hdd which has Windows on it and is my main drive.
The hdd I want to partition is an old drive with everything deleted off it. So if I mess anything up, I'll be fine.
I want to create 4 partitions at 40gb each. Then I can install 4 seperate distros (which is like 3 more than I need!)
Using the installer is a good idea. But I'm using debian live USB which doesn't have persistence.
Also, the debian installer has been removed from the OS - but that's another story.
Distribution: Debian 8 Cinnamon/Xfce/gnome classic Debian live usb
Posts: 508
Rep:
Quote:
Originally Posted by Head_on_a_Stick
@Higgboson -- How do you intend to install Debian if you have no installer?
EDIT: I've read through your post history and there is no way you should even be trying to install or use Debian -- it is not for newbies.
I'm going to use debootstrap.
There's a sticky about the pgm on the debian forum. It could help you.
I used to work as a software developer. But I wrote in rpg400 - not unix.
Programming isn't new to me - but the linux language is. Debian is bringing back old memories.
I've just found that the 'last cylinder' number can have a simple input of '+40g' for a 40gb partition.http://www.howtogeek.com/106873/how-...ions-on-linux/
This makes sense, doesn't it?
I'll let you know if debootstrap works for me soon.
Distribution: Debian 8 Cinnamon/Xfce/gnome classic Debian live usb
Posts: 508
Rep:
Quote:
Originally Posted by Head_on_a_Stick
Thank you for the advice.
There isn't enough space left on the drive you are working on and fdisk cannot resize partitions.
Also, the drive you are working on (/dev/sda) appears to have a Windows installation on it.
I may be wrong, but it looks to me as if you are about to damage your Windows system.
Yes. Windows has some system files on this old hard disk. I physically removed the hard disk and connected it back up again.
Now Windows won't start. I'm doing things to sort this problem out.
However, I can see I have a new problem related to this hard disk. It has an existing partition which needs to be deleted so I can use it to install linux distros. I'll have to start a new thread.
Thanks for your help.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.