A chronological documentation test project, nothing serious, really!

18 Sep 2018 Reinstall grub using Live-CDROM

After a failed upgrade to Ubuntu 14.04 the server complains about missing disk error. The solution was to reinstall grub and reboot. The procedure is loosely described here.

Boot your Ubuntu server using av Live CDROM you have downloaded from Ubuntu. Choose to Test Ubuntu since installation is not the desired option at this time.

Open a terminal window and become root using the sudo command and make the LVM disks available

# lvm vgscan -v
# vgchange -a y vgdisk-for-root-partition 
# mkdir /mnt/rootMount
# mount /dev/vgdisk-for-root-partition/root /mnt/root

Create a chroot environment where you can run the grub-install command

# mount –bind /dev /mnt/root/bind
# mount –bind /proc /mnt/root/proc
# mount /boot /mnt/root/boot
# chroot /mnt/root /bin/bash
# grub-install –root /dev/sda

Always make sure you are working on the right disk before using the grub-install command since it overwrites the boot loader.

Reboot the server when the grub-install command has been successfully run. The server should now be rebooting and working again as it used to.

Tags: , , , ,

Posted by

02 Nov 2015 How to mount LVM partitions from rescue mode

This is a short post about mounting LVM partitions when you are using a rescue CDROM or a desktop install CDROM. The whole process is only four easy steps.

  1. Boot your rescue media. This can be a CentOS, Ubuntu, Red Hat or other CDROM that gives you a console access to the server. Most newer linux distributions have LVM support available.Scan for volume groups
    # lvm vgscan -v
  2. Activate all Volume Groups
    # vgchange -a y “volume group name”
  3. List Logical Volumes
    # lvm lvs –all
  4. You have now activated the volumes and have all the information you need to mount them
    # mkdir /media/your-mount-point
    # mount /dev/volumegroup/logical-volume /media/your-mount-point

You can now look into /media/your-mount-point and see the content of your mounted LVM volume.

Tags: , , , ,

Posted by

10 Jul 2013 Mount VMware virtual disk VMDK-file in a physical linux machine

This example has been used on a machine with VMware Workstation 9 installed locally.
To mount a VMDK-file you can use the VMware command vmware-mount like this

$ sudo vmware-mount /path/to/vmdk/file/name-of-vmdk-file.vmdk 1 /path/to/mount/point
In the example above we have mounted partition 1 in the VMDK-file from the disk /path/to/vmdk/file/name-of-vmdk-file.vmdk
The files are now accessible from the mount point /path/to/mount/point.

This has been tested in Ubuntu Linux 12.04 LTS.
This command is also available in the Windows version of VMware Workstation.

Tags: , , , ,

Posted by

26 Mar 2013 Howto mount UDF ISO-13346 ISO file in Ubuntu

This is just a short note on how you can mount a UDF ISO-file in a Ubuntu console window.

# sudo mount -t udf,iso13346 -o loop ISO-filename.iso mountpoint

Remember to create the mountpoint folder before you try to mount the ISO file.

Tags: , , ,

Posted by

10 Sep 2010 Show mounted partitions with a nice layout

This command shows the result of a mount command in a nice table layout

# mount | column -t


/dev/sda1         on  /                                            type  ext4                   (rw,errors=remount-ro)
/dev/sda2         on  /home                                        type  ext4                   (rw)

Tags: ,

Posted by