how to increase cylinders on USB Flash Drive


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users how to increase cylinders on USB Flash Drive
# 1  
Old 09-29-2011
how to increase cylinders on USB Flash Drive

Hello All,

I faced a unique issue. I have written a script for transferring backup data on my host machine to a USB Flash drive. The Flash drive must be of 16GB size. So, my script creates two primary partitionon the USB flash drive. I require approx 5900 cylinders for the first partition on the Flash drive. Most USB flash drive have sufficient cylinders to create two primary partitions as required by my script.

However recently I used a CENTON flash drive which has 2785 cylinders. Hence, my script is not able to create partitions on it as the number of cylinders is less than required.

Anyone has any idea how to resolve this issue?? Please find below the failure

Code:
Disk /dev/sdc: 16.0 GB, 16095641600 bytes   [ USB Flash drive ]
217 heads, 52 sectors/track, 2785 cylinders
Units = cylinders of 11284 * 512 = 5777408 bytes
   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1               1        2786    15714304    c  W95 FAT32 (LBA)



partitioning failure

Code:
First cylinder (1-2785, default 1):
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-2785, default 2785): 5917
Value out of range.

Cheers,
Sachin

Moderator's Comments:
Mod Comment Video tutorial on how to use code tags in The UNIX and Linux Forums.

Last edited by pludi; 09-29-2011 at 04:57 AM..
# 2  
Old 09-29-2011
There's a very very simple solution to this: don't use a fixed amount of cylinders (a concept which doesn't apply to any modern disk anymore), but use the +xM notion instead, eg. +16384M.
# 3  
Old 09-29-2011
Thanks Pludi.

Could you be a bit more specific.

Cheers,
Sachin
# 4  
Old 09-29-2011
You'll have to be more specific on what I should be more specific about. Why the cylinders concept is obsolete? Why it's possible to declare a partition by size instead of cylinders? How one could enter the size instead of the cylinders?
# 5  
Old 09-29-2011
Yes Pludi. I want to know how to declare a partition by size instead of cylinders.

I am pasting the script which creates partition on Flash drive.

Code:
create_partitions_on_USB()
{
    PARTITION1=$1
    PARTITION2=$2
    fdisk /dev/sdc << EOF
o
n
p
1
${PARTITION1}
t
83
a
1
n
p
2
${PARTITION2}
t
2
83
w
EOF
}


what changes are required to this script??

Regards,
Sachin

Last edited by pludi; 09-29-2011 at 06:58 AM..
# 6  
Old 09-29-2011
First, learn how to use code tags.

Second, there's nothing to be changed in this "script", only what you pass along as the first and second parameter.
# 7  
Old 09-29-2011
All right. I pass 5917 and 654 as the two parameters to this script. These are basically system engineered values and are sizes of the partition in MB instead of cylinders.

Still, why am I facing this issue??
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Linux

Repeated corruption running linux on USB flash drive

I have a HP Proliant N40L server and in the internal USB socket I have a 16GB HP v195b flash drive on which I have a full copy of Debian installed from a copy of the DVD1 ISO image. In as far as installation and operation goes my setup works okay, but I keep experiencing corruption of the file... (0 Replies)
Discussion started by: mij
0 Replies

2. Solaris

Installing Solaris 10 x86 from USB flash drive

Dear friends, I have the DVD image of solaris 10 but I don't have DVD writer to burn it onto a dvd R. I was wondering if I could install Solaris from my 4gb usb flash drive as my PC supports booting from usb. I have installed Windows 7 this way recently, I have no idea about Solaris. Could you... (2 Replies)
Discussion started by: gabam
2 Replies

3. Boot Loaders

How to install grub on USB flash drive?

I wanna install grub on my flash drive for rescue usage. My computer installs winxp, and I have fedora12 installed in vmware. I did like this: step1: format the flash drive as FAT in winXP. step2: in fedora12, mount the flash drive on /media/flash step3: excute the command: grub-install... (10 Replies)
Discussion started by: vistastar
10 Replies

4. UNIX for Dummies Questions & Answers

SCO 5.0.5 & USB flash drive

Can someone help me with instructions on how to access a USB flash drive in SCO Unix 5.0.5? I need to copy ASCII text files that have been zipped onto the USB drive for transfer to a Windows computer. (0 Replies)
Discussion started by: jlodata
0 Replies

5. Ubuntu

USB flash drive/keyfob will not automount

I am working on an Ubuntu Linux 8.10 system that I do not want to reboot. For some reason, USB flash drives (mass storage devices) now no longer automount. I want to restore that functionality without rebooting. I can manually mount and unmount these things by doing: cd /media sudo mkdir thing... (4 Replies)
Discussion started by: ropers
4 Replies

6. Solaris

removable usb flash drive

# rmformat Looking for devices... 1. Logical Node: /dev/rdsk/c0t0d0p0 Physical Node: /pci@0,0/pci-ide@1f,1/ide@0/sd@0,0 Connected Device: HL-DT-ST DVD+-RW GWA4164B E113 Device Type: DVD Reader/Writer 2. Logical Node: /dev/rdsk/c2t0d0p0 Physical Node:... (26 Replies)
Discussion started by: seyiisq
26 Replies

7. UNIX for Dummies Questions & Answers

Does HPUX 10.2 or 11.i support any USB flash drive?

Where can I get a driver that support usb flash drives for my unix machines. I need a solution to transfer data easily for techs. I am running C3750 and c8000 HP equipment. Or is there a way to mount them and use them without adding drivers? thanks! (0 Replies)
Discussion started by: jkend12
0 Replies

8. SCO

mounting USB floppy drive /Flash drive in OSR 6.0

Can anybody help me out to mount USB flash /floppy drive in sco openserver 6.0 . (5 Replies)
Discussion started by: sureshdrajan
5 Replies

9. UNIX for Dummies Questions & Answers

USB flash drive is not mounting what to do...?

hello forum.. i am using RHEL 4.0 and my system is dual boot.normally the usb flash drive should be auto mount , but in my system i am unable to mount the drive plz help... i am a new user so plz give me in detail. thank u in advance. (5 Replies)
Discussion started by: manoranjan
5 Replies

10. Solaris

USB flash Drive

Hello all.. I have a Verbatim 2 GB flash drive. I also have Solaris 10 running on my workstation. If I am in the Windows environment, it detects the flash drive. But when I plug it while I am in solaris, nothing happens. How will solaris 10 detect my flash drive? What do I have to do? any... (4 Replies)
Discussion started by: vr76413
4 Replies
Login or Register to Ask a Question