Sponsored Content
Special Forums Hardware Filesystems, Disks and Memory "parted" command not working in Fedora9 Post 302809169 by RudiC on Saturday 18th of May 2013 01:09:40 PM
Old 05-18-2013
1) Why don't you show the entire output of all relevant commands so we can compare and then, hopefully, conclude the reasons for any strange behaviour?
2) I think that all pen drives come "preformatted" as one large disk/partition, so you can "mount the complete disk". As soon as you interfere yourself with partition tools, you are responsible for the result, i.e. you have to partition the space (and create a file system) you want to access.
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Listing only directories in the current working directory using the "ls" command

Hello All, I am trying to list only directories in my current directory using the command "ls -d". But the output only contains the default directory "." and doesn't list the rest of the directories in the working directory. Can anyone explain why this is happening (2 Replies)
Discussion started by: igandu
2 Replies

2. UNIX for Advanced & Expert Users

Running command "md5" on remote host not working.

My question is very strange. I can run ls command on remote host using ssh successfully. but when i try to run /sbin/md5 command on remote host. it doesnt run and get back to me on command prompt. md5 command is exist on remote host. This is what i tried which ran successfully. Query -... (1 Reply)
Discussion started by: ynilesh
1 Replies

3. Shell Programming and Scripting

sub option of awk command not working with "\" character.

Hi all, I would like to replace some string in a text file by some string which would contains special characters like "/","\". I.e. I have a text file with the statement contactperson somewhere in it. Now I want to replace it by something else which includes special characters like "/","\" ... (1 Reply)
Discussion started by: shareef
1 Replies

4. Solaris

"smbclient" command not working

I've installed Samba on my Solaris 10 (SPARC) server # pkginfo |grep samba system SUNWsmbac samba - A Windows SMB/CIFS fileserver for UNIX (client) system SUNWsmbar samba - A Windows SMB/CIFS fileserver for UNIX (Root) system ... (1 Reply)
Discussion started by: soliberus
1 Replies

5. Shell Programming and Scripting

"sed" command is not working in shell script

Hi All, I am not much strong in shell scripting... I am using sed command in my script to find and replace a string....... This is how script looks : ############# #!/usr/bin/ksh CONFIG_FILE=iom_test.txt FIND=`echo "NIS_FTP_SERVER1=123.456.iom.com"` REPLACE=`echo... (2 Replies)
Discussion started by: askumarece
2 Replies

6. UNIX for Advanced & Expert Users

command for recently modified files - "find" command not working

I have three files a.txt , b.txt , c.txt in a directory called my_dir1 .These files were created before two or three months . I have a tar file called my_tar1.tar which contains three files a.txt , b.txt , d.txt . Somebody untarred the my_tar1.tar into my_dir1 directory. So existing two files were... (1 Reply)
Discussion started by: joe.mani
1 Replies

7. Shell Programming and Scripting

awk command to replace ";" with "|" and ""|" at diferent places in line of file

Hi, I have line in input file as below: 3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL My expected output for line in the file must be : "1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL" Can someone... (7 Replies)
Discussion started by: shis100
7 Replies

8. UNIX for Dummies Questions & Answers

Using "mailx" command to read "to" and "cc" email addreses from input file

How to use "mailx" command to do e-mail reading the input file containing email address, where column 1 has name and column 2 containing “To” e-mail address and column 3 contains “cc” e-mail address to include with same email. Sample input file, email.txt Below is an sample code where... (2 Replies)
Discussion started by: asjaiswal
2 Replies

9. Shell Programming and Scripting

Using sed command to replace "|" with ^ for all *.dat files in a folder not working

I am trying to use the below sed command to replace all "|" to ^, in a folder had 50 dat files. when i tried with 1 file it worked but when i tried with wild card, is not working. sed -i 's/"|"/\^/g' *.dat Is this the proper way to use sed command thank you very much for help. (3 Replies)
Discussion started by: cplusplus1
3 Replies
chpt(8) 						      System Manager's Manual							   chpt(8)

Name
       chpt - change a disk partition table

Syntax
       /etc/chpt [ -a ] [ -d ] [ -q ] [ -v ] [ [ -px offset size ] ... ] device

Description
       The  command  lets  you alter the partition sizes of a disk pack.  Using you can tailor your system disks and their partitions to suit your
       system's individual needs.

       If you want to create a file system on a partition that has been modified, you must use

       The standard procedure to change a partition table is:

       1. Look at the current partition table using the -q option.

       2. If a file system does not exist on the a partition, create one using the command.

	  If a file system exists on the a partition but does not contain a partition table in its superblock, copy the partition table  from  the
	  driver to the superblock using the command with the -a option.

       3. Change the partition offsets and sizes using the -px option.	You can change all the partitions for one pack on one command line.

       The  device  must be either the a or c partition of the raw device, depending upon where the file system resides.  For example, if the file
       system resides in the a partition of an RM05 in drive 0, device is rhp0a.

       A file system must exist on the a or c partition of the pack.  If you do not have a file system there, create one using

Options
       -a    Copies the partition table in the device driver to the disk pack.

       -d    Copies the default partition table to the disk pack and to the current partition table in the driver.  The default partition table is
	     the table that was built with the disk driver.

       -q    Runs without modifying the partition tables.  This prints the partition table of the specified disk pack.	It prints the default par-
	     tition table in the driver if there is no partition table on the disk pack.

       -v    Prints verbose messages showing the progress of

       -px   Changes the parameters of partition x on the disk pack to the specified offset and size.  x is the partition you are modifying (a, b,
	     c,  d,  e, f, g, or h).  Offset is the new beginning sector, and size is the new total number of sectors of the partition being modi-
	     fied.

Examples
       This example shows how to change the partition table on an RM05 disk pack in drive 1.  The commands in this example change the the size	of
       the h partition to include the g partition.  Comments are in parenthesis to the right of commands.
       % chpt -q /dev/rhp1a	(view partition table)
       /dev/rhp1a
       No partition table found in superblock...
       using default table from device driver.
       Current partition table:
       partition       bottom	    top      size    overlap
	   a		    0	  15883     15884    c
	   b		16416	  49855     33440    c
	   c		    0	 500383    500384    a,b,d,e,f,g,h
	   d	       341696	 357579     15884    c,g
	   e	       358112	 414047     55936    c,g
	   f	       414048	 500287     86240    c,g
	   g	       341696	 500287    158592    c,d,e,f
	   h		49856	 341201    291346    c
       %
       In  all	of  the tables generated by bottom is the offset (starting sector), top is the ending sector, and size is the number of sectors in
       the partition.  The overlap is the other sectors that are partially or entirely included in the partition.
       % bc		   (basic calculator)
       500287-49856	   (top of g minus bottom of h)
       450431
       450431+1 	   (add 1 because it is zero-based)
       450432		   (size of new h partition)
       %

       From the query, you can see that there is no partition table in the superblock of the a partition.  If this is because  there  is  no  file
       system in the a partition, run the command to create one.

       For this example, assume that there is a file system in the a partition of the disk, but the file system does not contain a partition table
       in its superblock.  Therefore, run with the -a option to copy the partition table in the driver to the superblock of the a partition.
       % chpt -a /dev/rhp1a	(add table to a partition)
       %

       Now you have a partition table to change.
       % chpt -v -ph 49856 450432 /dev/rhp1a   (change h)
       /dev/rhp1a
       New partition table:
       partition       bottom  top     size    overlap
	   a		    0	15883	15884  c
	   b		16416	49855	33440  c
	   c		    0  500383  500384  a,b,d,e,f,g,h
	   d	       341696  357579	15884  c,g,h
	   e	       358112  414047	55936  c,g,h
	   f	       414048  500287	86240  c,g,h
	   g	       341696  500287  158592  c,d,e,f,h
	   h		49856  500287  450432  c,d,e,f,g
       %

Caution
       Changing partition tables indiscriminately can result in losing large amounts of data.

       Check for file systems on all the partitions of the disk before using the -p option.  If a  file  system  exists  whose	partition  may	be
       destroyed, copy it to a backup medium.  After you have changed the partitions, restore the backed up file system.

Restrictions
       You must have superuser privileges to use

       You  can not shrink or change the offset of a partition with a file system mounted on it or with an open file descriptor on the entire par-
       tition.

       You can not change the offset of the a partition.

See Also
       ioctl(2), disktab(5), fsck(8), mkfs(8), newfs(8)
       Guide to System Disk Maintenance

																	   chpt(8)
All times are GMT -4. The time now is 09:35 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy