Skip to content

Instantly share code, notes, and snippets.

@fovtran
Created June 18, 2013 09:45
Show Gist options
  • Save fovtran/5804075 to your computer and use it in GitHub Desktop.
Save fovtran/5804075 to your computer and use it in GitHub Desktop.
mount vkernels
#!/bin/csh
# Mounts root images for vKernels
#
set num = 01
set disk = 0
set name = rootimg
set file = /var/vkernel/$name\.$num
set dev = vn$disk
set slice = $dev\s0
if (! -e /dev/$slice ) then
vnconfig -c -s labels $dev $file
disklabel -r -w $slice auto
#disklabel -e $slice
endif
if ( -e /dev/$slice ) then
mount /dev/$slice /media/vn/$num
endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment