10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Good day,
Anybody, know how to clean/free up the Cluster_boot partition in TRU64
Thank you in advance
Miaka (0 Replies)
Discussion started by: miaka1012
0 Replies
2. Shell Programming and Scripting
Hello,
I need to compare the size of a file to what it's size was 20min ago. So far my outline script is:ls -ls /home > filesizeafter.txt
compare filesizeafter.txt filesizebefore.txt > filesizechange.txt
if /home filesizechange.txt > 100 {
email root;
}
ls -ls /home >... (2 Replies)
Discussion started by: chyurdan
2 Replies
3. Shell Programming and Scripting
solaris 10 (c shell)
need a command or script that will add up all (*.tmp) file sizes in bytes of a single directory, or kbytes, no matter (1 Reply)
Discussion started by: ajp7701
1 Replies
4. Solaris
I disabled the boot-archive service by using
#svcadm disable svc:/system/boot-archive:default
then i rebooted my system but i am unable to boot. It throws the following errors
CONSOLE LOGIN SERVICE(S) CANNOT RUN
then it automatically asked me for the maintenance mode passwd.
i logged... (3 Replies)
Discussion started by: dinu
3 Replies
5. UNIX for Dummies Questions & Answers
Hi everyone!
I need to compare two file sizes.
One of them (size) will be stored in a flat file and the other coming from a listed file.
I can now get the first file size using:
SIZE=`ls -l $DOCTYPE | awk '{print $5}'`
1. How can I store this value in a flat file?
2. How... (2 Replies)
Discussion started by: mrreds
2 Replies
6. Solaris
hi, I' ve found an error while starting up solaris 10, so I booted in safe mode from grub and modified the menu.lst with vi, to obtain a verbose output of the error. It says
failed to readsuperblock
diskread reading beyound end of ramdisk
start = 0x800 size=0x800
...
...
panic: cannot... (9 Replies)
Discussion started by: freeware
9 Replies
7. Shell Programming and Scripting
I have 2 big files in the size of gb. They are same with respect to content, both are “,” delimited. Now both of them are created by two different processes but has the same logic. The problem is they are differing only in few bytes for e.g one file is 202195751 bytes other is 202195773. So... (2 Replies)
Discussion started by: dsravan
2 Replies
8. Solaris
I had logged into Server via ALOM and was placed into runlevel 5 other than 3 which is default.
I did a svcadm delete boot-archive, and was promptly placed in runlevel 3.
Now, I am unable to do a telnet or login into the server through any other service.
bash-3.00# svcs -a
svcs -a
STATE ... (3 Replies)
Discussion started by: praveenr
3 Replies
9. Shell Programming and Scripting
hi
ls -l * | sed 's/\+/ /g' | cut -f5 -d " " >out1
ls -l * | sed 's/\+/ /g' | cut -f5 -d " " >out2
diff out1 out2
i tried this it will work fine and i can see difference
but i need a script which should neglect, if the difference b/w files is small
and
it should display... (5 Replies)
Discussion started by: revenna
5 Replies
10. UNIX for Dummies Questions & Answers
Hi I need to take a list of files that are defined by an ls -ltr or grep for particular file names - and add up the byte size colum which is field 5 seperated by a space.
I tried to do this but I think I am way off:
for file in 'ls -ltr | grep 20070916 | nawk -F" " '{temp+=5} END {print... (1 Reply)
Discussion started by: llsmr777
1 Replies
bootadm(1M) System Administration Commands bootadm(1M)
NAME
bootadm - manage bootability of GRUB-enabled operating system
SYNOPSIS
/sbin/bootadm update-archive [-vn] [-R altroot [-p platform]]
/sbin/bootadm list-archive [-vn] [-R altroot [-p platform]]
x86 only
/sbin/bootadm set-menu [-R altroot [-p platform]] key=value
/sbin/bootadm list-menu [-R altroot [-p platform]]
DESCRIPTION
The bootadm command manages the boot archive and, with x86 boot environments, the GRUB (GRand Unified Bootloader) menu. The update-archive
option provides a way for user to update the boot archive as a preventative measure or as part of a recovery procedure. The set-menu sub-
command allows you to switch the auto-boot timeout and default boot entry in the GRUB menu.
The list-menu subcommand displays the location of the GRUB menu and the current GRUB menu entries. While the typical location of the GRUB
menu is /boot/grub/menu.lst, depending on the install method used the active GRUB menu might be located somewhere else. Use the list-menu
subcommand to locate the active GRUB menu. For example, if a system was installed using Live Upgrade, the GRUB menu might not be located in
the current boot environment. See the EXAMPLES section for typical output from the list-menu option.
Note that OpenBoot PROM (OBP)-based machines, such as SPARC systems, do not use GRUB and have no boot menu manageable by bootadm.
The bootadm command determines dynamically the options supported by the image to be managed, so that bootadm invoked on one platform can be
used to manage diskless clients of a different platform type.
SUBCOMMANDS
The bootadm command has the following subcommands:
update-archive
Updates current boot archive if required. Applies to both SPARC and x86 platforms.
list-archive
Lists the files and directories to be included in the boot archive. Applies to both SPARC and x86 platforms.
set-menu
Maintain the GRUB menu. The current GRUB menu is boot/grub/menu.lst, relative to root. Do not depend on this location, because it is
subject to change. Applies to x86 platforms only.
list-menu
Lists the location of the active GRUB menu, as well as the current GRUB menu entries. This includes the autoboot-timeout, the default
entry number, and the title of each entry. Applies to x86 platforms only.
OPTIONS
The bootadm command has the following options:
-v
In an update-archive operation, stale files are displayed on stderr.
-n
In an update-archive operation, archive content is checked but not updated.
-p platform
The platform, or machine hardware class, of the client. The platform type can only be specified together with -R, and is generally use-
ful only for managing a diskless client where the client is of a different platform class than the server. Platform must be one of
i86pc, sun4u, or sun4v.
-R altroot
Operation is applied to an alternate root path.
Note -
The root file system of any non-global zones must not be referenced with the -R option. Doing so might damage the global zone's file
system, might compromise the security of the global zone, and might damage the non-global zone's file system. See zones(5).
key=value
Possible values are:
default=entrynum
The item number (for example, 0, 1, or 2) in the GRUB menu designating the operating system to boot when the timer expires.
timeout=seconds
The number of seconds before the operating system designated by the default item number is booted. If the value is -1, auto boot is
disabled.
EXAMPLES
Example 1 Updating the Current Boot Archive
The following command updates the current boot archive:
# bootadm update-archive
Example 2 Updating the Boot Archive on an Alternate Root
The following command updates the boot archive on an alternate root:
# bootadm update-archive -R /a
Example 3 Listing Installed OS Instances
The following command lists the installed operating system instances in a GRUB menu:
# bootadm list-menu
default=0
timeout=10(0) Solaris10(1) Solaris10 Failsafe(2) Linux
Example 4 Switching Default Boot Entry
The following command refers to the menu displayed in the previous example. The user selects Linux (item 2).
# bootadm set-menu default=2
Example 5 Listing GRUB Menu Entries and Location of GRUB Menu
The following command lists the GRUB menu entries and the location of the GRUB menu:
# bootadm list-menu
The location for the active GRUB menu is: /stubboot/boot/grub/menu.lst
default 0
timeout 10
0 Solaris10
1 Solaris10 failsafe
2 Linux
Example 6 Displaying Location of GRUB Menu
The following command displays the location of the GRUB menu:
# bootadm list-menu
The location for the active GRUB menu is: /dev/dsk/c0t1d0s0 (not mounted)
The filesystem type of the menu device is <ufs>
default 2
timeout 10
0 c0t1d0s3
1 c0t1d0s3 failsafe
2 Solaris10
3 Solaris10 failsafe
In this example, the active GRUB menu is located on a device which is not mounted. To access the GRUB menu, mount the device and access the
GRUB menu at <mountpoint>/boot/grub/menu.lst.
EXIT STATUS
The following exit values are returned:
0
The command completed successfully.
1
The command exited due to an error.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWcsu |
+-----------------------------+-----------------------------+
|Interface Stability |Committed |
+-----------------------------+-----------------------------+
SEE ALSO
boot(1M), installgrub(1M), attributes(5)
Consult the GRUB home page, under:
http://www.gnu.org/
SunOS 5.11 25 Apr 2008 bootadm(1M)