- Figure what your where your /boot and /root partition is installed in. My /boot was /dev/sdc2 and /root was /dev/sdc3.
- Mount /root to /mnt using sudo mount /dev/sdc3 /mnt
- Mount /boot to /mnt/boot using
mount /dev/sdc2 /mnt/boot.
NOTE: If both /root and /boot are on the same partition then you only have to mount the /root partition. - Check /mnt/boot/grub/device.map for an entry for /dev/sdc.
- If /dev/sdc does not exist, then add it using vi. For example, the entries in mine were
(hd0) /dev/sda
(hd1) /dev/sdb
So I added (hd2) /dev/sdc to list. - If this was not added to the list, the /root partition will not be found and the grub recovery will fail.
- Next re-install the grub by executing
sudo grub-install --root-directory=/mnt /dev/sdc - Reboot
- Refresh the GRUB 2 menu by executing update-grub2
Showing posts with label linux. Show all posts
Showing posts with label linux. Show all posts
Wednesday, September 1, 2010
Recover GRUB menu after Ubuntu 9.10 update
A couple the GRUB menu got screwed up after an update. The recover process can be found here. But I had to take a couple additional steps to fix my GRUB.
Friday, April 23, 2010
Install/Uninstall GlassFish on Linux
Uninstalling Glassfish V2 and installing Glassfish V3
Glassfish can be installed with the file-based installer or the JAR-based installer.
Uninstall instructions from SUN
Installtion instruction from SUN
Installing Glassfish
File-based
JAR-based
Uninstalling Glassfish
File-based
JAR-based and Zip
Glassfish can be installed with the file-based installer or the JAR-based installer.
Uninstall instructions from SUN
Installtion instruction from SUN
Installing Glassfish
File-based
- Download the file from
- chmod +x sges-glassfish-v3-unix.sh
- Create the installation directory: mkdir /usr/glassfish
- Navigate to where sges-glassfish-v3-unix.sh file exists.
- Run ./sges-glassfish-v3-unix.sh
- Follow the instructions.
- Download the file from
- Create the installation directory: mkdir /usr/glassfish
- Unzip contents to installation directory: unzip sges-v3-unix.zip
JAR-based
Uninstalling Glassfish
File-based
-
Navigate to your Enterprise Server installation directory.
-
Invoke the uninstallation program as follows:
-
To use the uninstallation in GUI mode, type:
./uninstall
-
To use the uninstallation in command-line mode, type:
./uninstall -console
-
JAR-based and Zip
-
Change to the directory containing the glassfish directory.
-
Run the following command: rm —r glassfish.
Thursday, April 22, 2010
Install/Uninstall Java on Linux
These commands were tested on CentOS 5.3
Installing Java
RPM Users
Install
Remove Java
NON-RPM Users
Install
Remove Java
Remember to remove the system or update the system variable JAVA_HOME. (The /etc/profile file for CentOS users).
Overview of JDK and JRE file structure here
Installing Java
- Download the latest stable JDK from here.
- RPM users (CentOS, RedHat, Fedora) should use the RPM builds.
- Non-RPM users (Debian, Ubuntu) should use the self extracting binary file.
- Remove the existing Java version.
- Install new Java version.
RPM Users
Install
- The RPM file I am using is jdk-6u
20-linux-x64-rpm.bin. - chmod +x jdk-6u
20-linux-x64-rpm.bin ./jdk-6u 20-linux-x64-rpm.bin
Remove Java
- In this example I am uninstalling jdk-6u16.
rpm -e sun-javadb-common-10.4.2-1.1 sun-javadb-client-10.4.2-1.1 sun-javadb-demo-10.4.2-1.1 sun-javadb-docs-10.4.2-1.1 jdk-1.6.0_16-fcs - This everything that was installed by the jdk-6u-linux-x64-rpm.bin package.
NON-RPM Users
Install
- chmod +x jdk-6u20
-linux-x64-bin ./jdk-6u 20-linux-x64-.bin
- Find the installation directory. Assume it is installed in /usr/java/jdk1.6.0_16
- Since this was a self extracting install all you have to do is remove the directory and its contents using the command shown below.
- rm -rf /usr/java/jdk1.6.0_16
Remember to remove the system or update the system variable JAVA_HOME. (The /etc/profile file for CentOS users).
Overview of JDK and JRE file structure here
Subscribe to:
Posts (Atom)