Sponsored Content
Operating Systems Solaris Help:"Bad checksum in disk label" and "Can't open disk label package"? Post 302408100 by jlliagre on Sunday 28th of March 2010 04:14:49 AM
Old 03-28-2010
You read the label with the "prtvtoc device" command and write it with the "fmthard device" one. The simpler would be to install the failing disk on the server that works and copy the label.
Beware not confusing disks when running the commands as you might end up with two broken systems ...
 

8 More Discussions You Might Find Interesting

1. Solaris

Big UH-OH "Bad magic number in disk label"

I tried rebooting my Sun server just a few minutes ago and I got the following at boot: -- Sun Fire 280R (UltraSPARC-III+) , No Keyboard Copyright 1998-2002 Sun Microsystems, Inc. All rights reserved. OpenBoot 4.5, 1024 MB memory installed, Serial #xxxxxxxxx Ethernet address... (6 Replies)
Discussion started by: deckard
6 Replies

2. UNIX for Dummies Questions & Answers

Explain the line "mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'`"

Hi Friends, Can any of you explain me about the below line of code? mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'` Im not able to understand, what exactly it is doing :confused: Any help would be useful for me. Lokesha (4 Replies)
Discussion started by: Lokesha
4 Replies

3. Shell Programming and Scripting

read -p "prompt text" foo say "read: bad option(s)" in Bourne-Shell

Hallo, i need a Prompting read in my script: read -p "Enter your command: " command But i always get this Error: -p: is not an identifier When I run these in c-shell i get this error /usr/bin/read: read: bad option(s) How can I use a Prompt in the read command? (9 Replies)
Discussion started by: wiseguy
9 Replies

4. 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

5. 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

6. Shell Programming and Scripting

Expect: spawn id exp5 not open while executing "expect "$" { send "sudo su -\r" }"

Hi All, i am trying to ssh to a remote machine and execute certain command to remote machine through script. i am able to ssh but after its getting hung at the promt and after pressing ctrl +d i am gettin the out put as expect: spawn id exp5 not open while executing "expect "$" {... (3 Replies)
Discussion started by: Siddharth shivh
3 Replies

7. Shell Programming and Scripting

Bash script - Print an ascii file using specific font "Latin Modern Mono 12" "regular" "9"

Hello. System : opensuse leap 42.3 I have a bash script that build a text file. I would like the last command doing : print_cmd -o page-left=43 -o page-right=22 -o page-top=28 -o page-bottom=43 -o font=LatinModernMono12:regular:9 some_file.txt where : print_cmd ::= some printing... (1 Reply)
Discussion started by: jcdole
1 Replies

8. AIX

Apache 2.4 directory cannot display "Last modified" "Size" "Description"

Hi 2 all, i have had AIX 7.2 :/# /usr/IBMAHS/bin/apachectl -v Server version: Apache/2.4.12 (Unix) Server built: May 25 2015 04:58:27 :/#:/# /usr/IBMAHS/bin/apachectl -M Loaded Modules: core_module (static) so_module (static) http_module (static) mpm_worker_module (static) ... (3 Replies)
Discussion started by: penchev
3 Replies
createlabel(3)						     Library Functions Manual						    createlabel(3)

NAME
createlabel - Creates a disk label structure for a disk device LIBRARY
Standard C Library (libc.a) SYNOPSIS
#include <sys/types.h> #include <sys/disklabel.h> int createlabel( char *devname, char *name, struct disklabel *disk, char *boot, int boot_len); PARAMETERS
Specifies the device special file name of the device. Specifies the name entry in the /etc/disktab file that is to be used for the label information. Otherwise, specify NULL to indicate that the name entry either is not in the /etc/disktab file, or, if it is, that it should be ignored. Points to the disk label structure that is filled in with the returned disk description on successful completion of the func- tion. Points to the buffer that the function may use to contain the (optional) primary and secondary bootstrap names for the disk label. Specifies the length of the boot buffer. The value must be set to the value of the BUFSIZ constant. DESCRIPTION
The function fills in the disk label structure pointed to by the disk parameter. The resulting disk label can then be written to the disk in order to label it. The function queries the device, using the devname parameter, to obtain the disk's geometry, capacity, and any default partition informa- tion. The function checks the name parameter. If name is non-null, the function looks for an entry in the /etc/disktab file that matches the name string and initializes the disk label structure from that entry. The function then overrides the device data and initializes the disk label structure from the entry in the /etc/disktab file. If the name string is NULL, or has no matching entry in the /etc/disktab file, the function queries the device (using the devname parame- ter) to obtain the device's name string. The function then looks for an entry in the /etc/disktab file that matches that name string, and if it finds a match, initializes the disk label structure from that entry. If an /etc/disktab entry indicates that the device has a dynamic geometry, the function queries the device (using the devname parameter) to obtain the disk's true geometry and capacity and to override any value given in an /etc/disktab entry associated with the device. In this case, any -1 lengths encountered in the partition specifications for the entry are replaced by a value equal to the device's total capacity minus the starting offset of the partition. RETURN VALUES
Upon successful completion of the createlabel function, a value of 0 is returned and the contents of the disk label structure are updated. Upon error, a value of -1 is returned and errno is set to [EINVAL]. ERRORS
Either disk or boot is NULL, or boot_len is not equal to BUFSIZ. FILES
Table of disk partition sizes for supported disks. RELATED INFORMATION
Commands: disklabel(8) Functions: getdiskbyname(3). Files: disklabel(4), disktab(4) delim off createlabel(3)
All times are GMT -4. The time now is 05:42 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy