I personally would not run commands like fdisk that way, at the risk of screwing up a disk.
It is your disk, so:
in UNIX you create a script using a here document:
EOF can be any word that the shell does not interpret as a command. You can even use a ! I picked EOF as a lot people use it... That last EOF has to be in column 1.
This User Gave Thanks to jim mcnamara For This Post:
I have two disks on a sun blade 100. I just installed a solaris8 on the first disk. The installation was successful. But the problem is now I lost all data / partition on my second hard disk.
The possible reason could be:
1. I used default web start install. During the installation I didn't... (2 Replies)
Hello everyone -
Please forgive me if I violate the forum's etiquette as this is my very first post. I'm posting this on both the dummies and the advance section with the hope for any responses.
I stumbled on this forum while frantically looking for an answer to a dumb, ignorant thing I did... (2 Replies)
Hello everyone -
Please forgive me if I violate the forum's etiquette as this is my very first post. I'm posting this on both the dummies and the advance section with the hope for any responses.
I stumbled on this forum while frantically looking for an answer to a dumb, ignorant thing I did... (5 Replies)
Q. Write a script that behaves both in interactive and non interactive mode. When no arguments are supplied it picks up each C program from the directory and prints first 10 lines.
It then prompts for deletion of the file.
If user supplies arguments with the script , then it works on those files... (1 Reply)
Q. Write a script that behaves both in interactive and non interactive mode. When no arguments are supplied it picks up each C program from the directory and prints first 10 lines.
It then prompts for deletion of the file.
If user supplies arguments with the script , then it works on those files... (8 Replies)
I'm using
fdisk -l > myFile
to get the file size of the device in a file where I want the output
but one line always go to the terminal and make my interface look ugly:
Disk /dev/sda doesn't contain a valid partition table
How do I stop this line from going to the command line with a... (2 Replies)
Hello,
I have a RHEL system with two 500GB hard drives in RAID 1 (I think hardware, but not 100% certain - any way to tell?).
It looks like it was just set up in default configuration with a small boot partition and one huge partition for the rest, which composes a LVM volume.
I want... (1 Reply)
Hello,
I have been going through our environment and I see we have a few servers with LVM's setup and the file system type is still set to "83" within fdisk. If I change this to "8e", will it hurt the data or cause any loss? I need to know for sure before I make the change. (1 Reply)
Hello,
MBR partition table made by linux fdisk looks certainly not correct when printed by openbsd fdisk:
Partition table created on linux (centos 6.3):
# fdisk -l /dev/sdc
Disk /dev/sdc: 10.7 GB, 10737418240 bytes
255 heads, 63 sectors/track, 1305 cylinders
Units = cylinders of 16065 *... (2 Replies)
Discussion started by: vilius
2 Replies
LEARN ABOUT XFREE86
cmdk
cmdk(7D) Devices cmdk(7D)NAME
cmdk - common disk driver
SYNOPSIS
cmdk@target, lun : [ partition | slice ]
DESCRIPTION
The cmdk device driver is a common interface to various disk devices. The driver supports magnetic fixed disks and magnetic removable
disks.
The block-files access the disk using the system's normal buffering mechanism and are read and written without regard to physical disk
records. There is also a "raw" interface that provides for direct transmission between the disk and the user's read or write buffer. A sin-
gle read or write call usually results in one I/O operation; raw I/O is therefore considerably more efficient when many bytes are transmit-
ted. The names of the block files are found in /dev/dsk; the names of the raw files are found in /dev/rdsk.
I/O requests to the magnetic disk must have an offset and transfer length that is a multiple of 512 bytes or the driver returns an EINVAL
error.
Slice 0 is normally used for the root file system on a disk, slice 1 as a paging area (for example, swap), and slice 2 for backing up the
entire fdisk partition for Solaris software. Other slices may be used for usr file systems or system reserved area.
Fdisk partition 0 is to access the entire disk and is generally used by the fdisk(1M) program.
FILES
/dev/dsk/cndn[s|p]n block device (IDE)
/dev/rdsk/cndn[s|p]n raw device (IDE)
where:
cn controller n
dn lun n (0-7)
sn UNIX system slice n (0-15)
pn fdisk partition(0)
/kernel/drv/cmdk 32-bit kernel module.
/kernel/drv/amd64/cmdk 64-bit kernel module.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Architecture |x86 |
+-----------------------------+-----------------------------+
SEE ALSO fdisk(1M), mount(1M), lseek(2), read(2), write(2), readdir(3C), scsi(4), vfstab(4), attributes(5), dkio(7I)SunOS 5.10 9 Oct 2004 cmdk(7D)