I hope you have an EFI label on that disk, or at least one with a non-standard Sun layout. Because the normal Sun partitioning scheme uses overlapping partitions where, as other have noted, slice 2 overlaps everything on the disk.
If you used slice 2 and the disk is partitioned something like this:
what is the function of swap in linux why i have to create apsolutely a particion for the swap when i install (i installed lnx4win mandrake and made an automat. disk particion and the install program one of my disk partitions that was 3gb devidet in 4 one native 700mb swap 600mb and the others i... (1 Reply)
how do i write a script that'll open what i entered and scan it for a certain line of text.
for example, i enter a filename (that exists) and in that file i want to scan a certain word that'll show how much of that word appears throughout the file. (2 Replies)
hello! i am very new to this, so please bear with me. i used red hat linux to creat a little two page website for school, which was really just an exercise in absolute and relative paths.
so, now, its all done, and i want to play with it some more, but i think there may be a problem with vi. i... (3 Replies)
Hi Guys
I have a quick question
I have a file that is approx 1.5 million lines long of which most of the lines start with
INFO: some info
INFO: some more info
INFO: etc
I want to remove these lines
I was thinking along the lines of
:%s/INFO*//g
but this does not work
None... (6 Replies)
1. How the Unix system identify the Other User to access for file permission?
2. What command we use to convert the extension of a file name?
3. What command use to convert other editing file to Unix based text file?
Please answer of these Question???Its necessary for me?? (3 Replies)
Hi,
I am doing a C++ self-study and I got stuck with this problem.
I want to have a code that asks the suer to enter two numbers and then it lists the numbers between these two numbers. It has also to print a message if these two numbers are equal.
Here is what I wrote:
#include <iostream>... (11 Replies)
Hi,
I'm new to unix and got struck here.Can any one help me out.My question is ..
is the command
if ;
then
echo "do some stuff"
fi
correct?
Thanks in advance
abhijeet (18 Replies)
Hi,
When doing ls -l, is it right to assume that all files with the date and time on it are files that are created/modified on the current year?
Is there any way to display the creation/modified date of a file that are not created/modified in the current year? (4 Replies)
Discussion started by: newbie_01
4 Replies
LEARN ABOUT OPENSOLARIS
efi_alloc_and_read
efi_alloc_and_init(3EXT) Extended Library Functions efi_alloc_and_init(3EXT)NAME
efi_alloc_and_init, efi_alloc_and_read, efi_free, efi_write, efi_use_whole_disk - manipulate a disk's EFI Partition Table
SYNOPSIS
cc [ flag ... ] file... -lefi [ library ... ]
#include <sys/vtoc.h>
#include <sys/efi_partition.h>
int efi_alloc_and_init(int fd, uint32_t nparts, dk_gpt_t **vtoc);
int efi_alloc_and_read(int fd, dk_gpt_t **vtoc);
void efi_free(dk_gpt_t *vtoc);
int efi_write(int fd, dk_gpt_t *vtoc);
int efi_use_whole_disk(int fd);
DESCRIPTION
The efi_alloc_and_init() function initializes the dk_gpt_t structure specified by vtoc in preparation for a call to efi_write(). It calcu-
lates and initializes the efi_version, efi_lbasize, efi_nparts, efi_first_u_lba, efi_last_lba, and efi_last_u_lba members of this
sturcture. The caller can then set the efi_nparts member.
The efi_alloc_and_read() function allocates memory and returns the partition table.
The efi_free() function frees the memory allocated by efi_alloc_and_init() and efi_alloc_and_read().
The efi_write() function writes the EFI partition table.
The efi_use_whole_disk() function takes any space that is not contained in the disk label and adds it to the last physically non-zero area
before the reserved slice (from slice 0 to slice 6 or unallocated space).
The fd argument refers to any slice on a raw disk, opened with O_NDELAY. See open(2).
The nparts argument specifies the number of desired partitions.
The vtoc argument is a dk_gpt_t structure that describes an EFI partition table and contains at least the following members:
uint_t efi_version; /* set to EFI_VERSION_CURRENT */
uint_t efi_nparts; /* number of partitions in efi_parts */
uint_t efi_lbasize; /* size of block in bytes */
diskaddr_t efi_last_lba; /* last block on the disk */
diskaddr_t efi_first_u_lba; /* first block after labels */
diskaddr_t efi_last_u_lba; /* last block before backup labels */
struct dk_part efi_parts[]; /* array of partitions */
RETURN VALUES
Upon successful completion, efi_alloc_and_init() returns 0. Otherwise it returns VT_EIO if an I/O operation to the disk fails.
Upon successful completion, efi_alloc_and_read() returns a positive integer indicating the slice index associated with the open file
descriptor. Otherwise, it returns a negative integer to indicate one of the following:
VT_EIO An I/O error occurred.
VT_ERROR An unknown error occurred.
VT_EINVAL An EFI label was not found.
Upon successful completion, efi_write() returns 0. Otherwise, it returns a negative integer to indicate one of the following:
VT_EIO An I/O error occurred.
VT_ERROR An unknown error occurred.
VT_EINVAL The label contains incorrect data.
Upon successfully completion, efi_use_whole_disk() returns 0. Otherwise, it returns a negative integer to indicate one of the following:
VT_EIO An I/O error occurred.
VT_ERROR An unknown error occurred.
VT_EINVAL The label contains incorrect data.
VT_ENOSPC Space out of label was not found.
USAGE
The EFI label is used on disks with more than 1^32-1 blocks. For compatibility reasons, the read_vtoc(3EXT) and write_vtoc() functions
should be used on smaller disks. The application should attempt the read_vtoc() or write_vtoc() call, check for an error of VT_ENOTSUP,
then call the analogous EFI function.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Interface Stability |Committed |
+-----------------------------+-----------------------------+
|MT-Level |Unsafe |
+-----------------------------+-----------------------------+
SEE ALSO fmthard(1M), format(1M), prtvtoc(1M), ioctl(2), open(2), libefi(3LIB), read_vtoc(3EXT), attributes(5), dkio(7I)SunOS 5.11 8 May 2008 efi_alloc_and_init(3EXT)