EFI disk labeling / understand the parition table / sectors not continue
Hi all,
I have a EFI disk and it is use in zfs pool.
It mentioned that there are total of (a)1172107117 + (b)16384 = 1172123501 sectors (c)
Partition 8 = 1172107151 to 1172123534 = 16384 sectors which match (b)
Partition 0 = 256 to 1172107150 = 1172106895 sectors which dont match (a)
Addup the sectors in the 2 partitions
which is <= to the total sectors (1172123501) (c)
If i say partition 0 = first sector 0 to 1172107150 which addup to 1172107151 sectors which is then even more then 1172107117 (a)
How it all adds-up ?
Where are all the missing or extra sectors ?
First post :) ...
Here is a script for automatic labeling of previously unlabeled disks.
Other methods exist (format -f cmd_file), but I like this because it's all in one place.
#!/bin/ksh
#----------------------
# format_label
# Automatic labeling of previously unlabeled disks
#... (1 Reply)
Is there a way to determine the number of available spare sectors on a disk ? as it may be useful for notifying a user to take a backup of the disk before it runs into a medium error. (6 Replies)
Hello, I need advice on how to check if started processes are finished in perl, here's explanation :
OS is RHEL 4, perl -v = "This is perl, v5.8.0 built for i386-linux-thread-multi"
The logic of the script :
#!/usr/bin/perl
use warnings;
$param1 = $ARGV;
$param2 = $ARGV;
$param3 =... (2 Replies)
I found a document: Bad block HOWTO for smartmontools
My hard drive is Maxtor:
root]# fdisk -lu /dev/hda
Disk /dev/hda: 81.9 GB, 81964302336 bytes
255 heads, 63 sectors/track, 9964 cylinders, total 160086528 sectors
Units = sectors of 1 * 512 = 512 bytes
Disk identifier: 0x3f4e3f4d
... (0 Replies)
Hi all,
I'm kind of new to programming in Linux & c/c++. I'm currently writing a FileManager using Ubuntu Linux(10.10) for Learning Purposes. I've got started on this project by creating a loopback device to be used as my virtual hard disk. After creating the loop back hard disk and mounting it... (23 Replies)
i'm writing some code to simulate the boot progress after power on
but when i try to read the 2nd sector from a floppy disk, this operation always fail with ah=0x80h which means timeout, how can i get over this problem?
my code would be like this:
$ cat boot.S
.code16
#define SETUPLEN 4... (0 Replies)
i'm writing some code to simulate the boot progress after power on
but when i try to read the 2nd sector from a floppy disk, this operation always fail with ah=0x80h which means timeout, how can i get over this problem?
my code would be like this:
$ cat boot.S
.code16
#define SETUPLEN 4... (0 Replies)
i'm writing some code to simulate the boot progress after power on
but when i try to read the 2nd sector from a floppy disk, this operation always fail with ah=0x80h which means timeout, how can i get over this problem?
my code would be like this:
$ cat boot.S
.code16
#define SETUPLEN 4... (0 Replies)
Discussion started by: wljackhero
0 Replies
LEARN ABOUT CENTOS
prtvtoc
prtvtoc(1M) System Administration Commands prtvtoc(1M)NAME
prtvtoc - report information about a disk geometry and partitioning
SYNOPSIS
prtvtoc [-fhs] [-t vfstab] [-m mnttab] device
DESCRIPTION
The prtvtoc command allows the contents of the label to be viewed. The command can be used only by the super-user.
The device name can be the file name of a raw device in the form of /dev/rdsk/c?t?d?s2 or can be the file name of a block device in the
form of /dev/dsk/c?t?d?s2.
OPTIONS
The following options are supported:
-f Report on the disk free space, including the starting block address of the free space, number of blocks, and unused parti-
tions.
-h Omit the headers from the normal output.
-m mnttab Use mnttab as the list of mounted filesystems, in place of /etc/mnttab.
-s Omit all headers but the column header from the normal output.
-t vfstab Use vfstab as the list of filesystem defaults, in place of /etc/vfstab.
EXAMPLES
Example 1: Using the prtvtoc Command
The following example uses the prtvtoc command on a 424-megabyte hard disk:
example# prtvtoc /dev/rdsk/c0t3d0s2
* /dev/rdsk/c0t3d0s2 partition map
*
* Dimension:
* 512 bytes/sector
* 80 sectors/track
* 9 tracks/cylinder
* 720 sectors/cylinder
* 2500 cylinders
* 1151 accessible cylinders
*
* Flags:
* 1: unmountable
* 10: read-only
* * First Sector Last
* Partition Tag Flags Sector Count Sector Mount Directory
0 2 00 0 76320 76319 /
1 3 01 76320 132480 208799
2 5 00 0 828720 828719
5 6 00 208800 131760 340559 /opt
6 4 00 340560 447120 787679 /usr
7 8 00 787680 41040 828719 /export/home
example#
The data in the Tag column above indicates the type of partition, as follows:
Name Number
UNASSIGNED 0x00
BOOT 0x01
ROOT 0x02
SWAP 0x03
USR 0x04
BACKUP 0x05
STAND 0x06
VAR 0x07
HOME 0x08
ALTSCTR 0x09
CACHE 0x0a
RESERVED 0x0b
The data in the Flags column above indicates how the partition is to be mounted, as follows:
Name Number
MOUNTABLE, READ AND WRITE 0x00
NOT MOUNTABLE 0x01
MOUNTABLE, READ ONLY 0x10
Example 2: Using the prtvtoc Command with the -f Option
The following example uses the prtvtoc command with the -f option on a 424-megabyte hard disk:
example# prtvtoc -f /dev/rdsk/c0t3d0s2
FREE_START=0 FREE_SIZE=0 FREE_COUNT=0 FREE_PART=34
Example 3: Using the prtvtoc Command on a Disk Over One Terabyte
The following example uses uses the prtvtoc command on a disk over one terabyte:.
example# prtvtoc /dev/rdsk/c1t1d0s2
* /dev/rdsk/c1t1d0s2 partition map
*
* Dimensions:
* 512 bytes/sector
* 3187630080 sectors
* 3187630013 accessible sectors
*
* Flags:
* 1: unmountable
* 10: read-only
*
* First Sector Last
* Partition Tag Flags Sector Count Sector Mount Directory
0 2 00 34 262144 262177
1 3 01 262178 262144 524321
6 4 00 524322 3187089340 3187613661
8 11 00 3187613662 16384 318763004
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWcsu |
+-----------------------------+-----------------------------+
SEE ALSO devinfo(1M), fmthard(1M), format(1M), mount(1M), attributes(5)WARNINGS
The mount command does not check the "not mountable" bit.
SunOS 5.10 25 Jul 2002 prtvtoc(1M)