{"id":2359,"date":"2013-07-16T12:34:06","date_gmt":"2013-07-16T04:34:06","guid":{"rendered":"http:\/\/rmohan.com\/?p=2359"},"modified":"2013-07-16T12:34:06","modified_gmt":"2013-07-16T04:34:06","slug":"tips-in-linux","status":"publish","type":"post","link":"https:\/\/mohan.sg\/?p=2359","title":{"rendered":"tips in linux"},"content":{"rendered":"<p> mount -t iso9660 -o loop file.iso \/mnt  # Mount a CD image<\/p>\n<p># mount -t ext3 -o loop file.img \/mnt   # Mount an image with ext3 fs<\/p>\n<p># mount -o loop file.iso \/mnt # extract an iso image to mnt<\/p>\n<p>Remount a device without unmounting it.<br \/>\n# mount -o remount,ro \/<\/p>\n<p>Copy the raw data from a cdrom into an iso image:<br \/>\n# dd if=\/dev\/cd0c of=file.iso<\/p>\n<p>Convert a Nero .nrg file to .iso<br \/>\n   Nero simply adds a 300Kb header to a normal iso image. This can be trimmed with dd<br \/>\n# dd bs=1k if=imagefile.nrg of=imagefile.iso skip=300<\/p>\n<p>Create a memory file system<br \/>\n  A memory based file system is very fast for heavy IO application. How to create a 64 MB partition mounted on \/memdisk:<\/p>\n<p># mount -t tmpfs -osize=64m tmpfs \/memdisk<\/p>\n<p>Create a file based Image<br \/>\n  For example a partition of 1GB using the file \/usr\/vdisk.img. Here we use the vnode 0, but it could also be 1.<\/p>\n<p> The file based image can be automatically mounted during boot with an entry in \/etc\/rc.conf and \/etc\/fstab.<\/p>\n<p># dd if=\/dev\/zero of=\/usr\/vdisk.img bs=1024k count=1024<\/p>\n<p># mkfs.ext3 \/usr\/vdisk.img<\/p>\n<p># mount -o loop \/usr\/vdisk.img \/mnt<\/p>\n<p># umount \/mnt; rm \/usr\/vdisk.img    # Cleanup<\/p>\n","protected":false},"excerpt":{"rendered":"<p> mount -t iso9660 -o loop file.iso \/mnt # Mount a CD image<\/p>\n<p># mount -t ext3 -o loop file.img \/mnt # Mount an image with ext3 fs<\/p>\n<p># mount -o loop file.iso \/mnt # extract an iso image to mnt<\/p>\n<p>Remount a device without unmounting it. # mount -o remount,ro \/<\/p>\n<p>Copy the raw [&#8230;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[17],"tags":[],"_links":{"self":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/2359"}],"collection":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2359"}],"version-history":[{"count":1,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/2359\/revisions"}],"predecessor-version":[{"id":2360,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/2359\/revisions\/2360"}],"wp:attachment":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2359"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2359"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2359"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}