Saturday 9 March 2013

YouTube RMPrepUSB and grub4dos videos now available

Despite suffering from a cold, I managed to get the following videos up onto YouTube:



Part 1            - Basic USB formatting with RMPrepUSB
Part 2a and b - Advanced features of RMPrepUSB
Part 3a and b - Making a multiboot grub4dos drive using RMPrepUSB

Each one is about 15 minutes long (max allowed!).

Part 1

Part 2a

Part 2b

Part 3a grub4dos

Part 3b grub4dos  cont.


Macrium Reflect Free Edition provides easy way to generate WinPE

Tutorial 107 describes how to create a WinPE bootable ISO without needing to type anything on the command line or do anything more complicated than click a few buttons.
It uses Macrium Reflect Free Edition to build a nice Windows PE (v3 SP1) bootable ISO which you can then add to your multiboot grub4dos USB drive.
It will also make backups or restore your hard disk and fix boot problems too!


Thursday 7 March 2013

RMPrepUSB v2.1.659 now available

This version has a few tweaks and the latest version of grub4dos (grldr).
One new feature - make a grub4dos bootable ISO from a grub4dos bootable drive. This allows you to build and test your grub4dos multiboot system using a USB flash drive (for instance) and then when you are happy with it, you can convert it to an ISO file, test it using RMPrepUSB Boot from ISO, and if all is OK, burn the ISO to a CD or DVD (using external burn s\w).
Also, 'How to use RMPrepUSB' videos are now on YouTube.
http://www.rmprepusb.com/tutorials/video-tutorials - part 1, 2a and 2b.
Part 3 will be about grub4dos (when I get the time!).
If there is anything you would like me to cover in it, let me know!


Wednesday 27 February 2013

Sample grub4dos menus

I have made available a few sample grub4dos menus here. This allows you to test out different resolution bitmaps on diffferent systems.
Some include example uses of the menusetting utility which changes the size and position of the menu on the screen. One also loads the UniFont font file for you to view it's affect.
Note that some of the files are in UTF-8 format as they contain unicode characters (e.g. Chinese).



Saturday 16 February 2013

Boot pclinuxos from an iso with persistence

pclinuxos can be booted from an ISO file, however it will not boot if the ISO file is on an NTFS USB drive (it cannot find the cdlive.sqfs file). In addition, persistence will not work unless an ext2/3 partition is available.
However, by using the grub4dos partnew command and mapping the iso to one partition on the USB drive, and an ext2 file to another partition on the USB drive, we can boot pclinuxos from an ISO with persistence.
To see how to do this have a look at Tutorial 104.


Saturday 9 February 2013

A Puppy is not just for Xmas!

I have added a .mnu file for the Easy2Boot project for Puppy Linux Precise 5.4.3 with persistence.
Just add the ISO (named precise-5.4.3.iso) to your Easy2Boot's \_ISO\Linux folder and then add the .mnu file.
When you first boot Puppy and then Exit, it will prompt you to save settings to a file at the root of the USB drive. It will also prompt you to copy the .sfs file from 'CD' to the USB drive - you should answer No to this as there is no speed advantage. When you next boot Puppy, your new settings will also be loaded.

Easy2Boot Tutorial #72.See here for a forum discussion. 

v2.1.657 - File Info function updated to display boot sector info

If you use Drive Info in RMPrepUSB to read sectors from a disk, if it is recognised as an MBR or PBR, the internal values will be parsed and displayed for you in Notepad. However, the File Info function in RMPartUSB only displayed MBR values if it detected a valid MBR but did not display PBR values. v2.1.657 fixes this. Now you can use File Info to display the hex data in a bootsect.dat PBR file, for instance, and it will parse the BPB for you - e.g.


COMMAND LINE: FILE="F:\bootsect.dat" FILEINFO FILESTART=0 SURE 

FAT32
000B Bytes Per Sector = 512 (0200h)
000D Sectors Per Cluster = 8 (08h)
000E Reserved Sectors before first FAT = 32 (0020h)
0010 Number of FATs = 2 (02h)
0011 Root Entries = 0 (0000h)
0013 Total Log Sectors (small) = 0 (0000h)
0015 Media Descriptor = 248 (F8h) HDD
0016 Sectors per FAT table = 0 (0000h)
0018 Sectors per Track = 63 (003Fh)
001A Number of Heads per Cylinder = 255 (00FFh)
001C Hidden Sectors preceding Partition = 63 (0000003Fh)
0020 Total Log. Sectors (big) = 16203713 (00F73FC1h)
0024 Log. Sectors per FAT = 15794 (00003DB2h)
0028 Mirroring Flags = 0 (0000h)
002A Version No. = 0 (0000h)
002C Cluster No. of Root Dir Start = 2 (00000002h)
0030 Log. Sector No. of FS Info Sector = 1 (0001h)
0032 First logical sector number of a copy of the three FAT32 boot sectors, typically 6 = 6 (0006h)
0040 Physical Drive Number = 128 (80h) First Fixed Disk
0042 Extended Boot Signature = 41 (29h)
0047 Volume Label = NO NAME    
0052 FileSystem Type = FAT32   

First FAT begins at LBA 95
Second FAT begins at LBA 15889
Root Directory begins at LBA 31683
First file data (cluster 0) begins at LBA 31691

Thursday 7 February 2013

WinToFlash or WinToSlug?

A recent post on reboot.pro complained that a USB flash drive that was prepared for XP installs using WinToFlash, worked well on one system, but would not boot on another and gave an 'NTLDR is missing' error.
I decided to try WinToFlash with an XP install ISO for myself. The first thing I found was that when using the default settings, when I used a USB flash drive created by WinToFlash, the first text mode XP install copy files phase took over 70 minutes!
It turns out this is due to FAT32 being used by WinToFlash for the USB drive format. If this is changed to FAT16LBA, then the 2GB volume created on my 8GB USB drive, when booted will install the same XP files in just 7 minutes.
I also found that if I reformatted the same USB drive as 8GB NTFS and used grub4dos to launch setup, the same install phase takes just over 4 minutes.
To learn how to make the NTFS WinToFlash drive, read Tutorial 102.
By using NTFS, it also removes the 'NTDLR not found' issue - although I have also given details of how this can be avoided even if you 'stick' (pardon the pun!) to FAT.

Saturday 2 February 2013

Xiaopan - boot from ISO on USB

A new tutorial has been added on how to add Xiaopan to a grub4dos multiboot USB drive here.

It dynamically finds and uses the UUID of the volume and can also use a 'persistent' data store.

The tutorial was written after a few hours of experimentation in response to a plea from reboot.pro forum member Hexley Darwin.

Saturday 26 January 2013

Using the SHIFT key to modify the behaviour of a grub4dos menu entry


If you have linux in your grub4dos menu.lst, you often need two entries, one for normal mode and one for safe mode so that you can boot on 'difficult' hardware.

This solution allows you to just have one menu entry but you can hold down SHIFT when you hit Enter to use safe mode parameters.

For this you need the bios utility on your drive (in this case in the root of the boot drive).You could also test for Ctrl or Alt and some other keys.

Note some lines are long and run over - use cut and paste!

title Run Linux\nPress SHIFT+ENTER for safe mode 
/bios int=0x16 eax=0x00000200 > (md)0x300+1
cat --skip=12 --length=2 (md)0x300+1 | set /a n=0x > nul 
set /a n=%n% & 0x03 > nul && if %n%>=1 echo SHIFT PRESSED! 
#LShift=01,RShift=02,CTRL=04,ALT=08,SCROLL=10,NUM=20,CAPS=40,INS=80 
#set /a n=%n% & 0x04 > nul && if %n%>=1 echo CTRL PRESSED! 
set sf=
if %n%>=1 set sf=acpi=off irqpoll noapic noapm nodma nomce nolapic nosmp 
kernel /casper/vmlinuz file=/cdrom/preseed/ubuntu.seed boot=casper %sf% splash 
initrd /casper/initrd.img



Bios Int 16 ah=2 reference here

NOTE: was...
/bios int=0x16 eax=0x00000200 > (md)0x300+1 && cat --skip=12 --length=2 (md)0x300+1 | set /a n=0x > nul

the 2nd half of the line is only executed if the BIOS returns non-zero. So && should not be used in this case.

Wednesday 23 January 2013

WinContig version updated in RMPrepUSB

RMPrepUSB now uses a later version of WinContig to make all files on a USB drive contiguous. I have had it crash on several occasions when running on my USB FAT32 flash drives. The new version seems much more stable. 

Monday 21 January 2013

Fix 'Error 60 - File not contiguous'!

You have probably come across this error message from grub4dos. It occurs when the file that it is trying to use is not contiguous.

To fix this you can run RMPrepUSB and select the USB drive and press Ctrl+F2 to run WinContig and defragment all files on the drive.

Making all file contiguous on a drive is not the same as defragmenting the drive. Defragmenting a drive shifts all the files to the beginning of the drive but often does not make all the files contiguous. WinContig does not shift the files if they are already contiguous and so WinContig is quicker and more effective than defragging the whole drive using a defrag utility.

Note: WinContig, Defraggler and other similar utilities usually need a contiguous run of free clusters on a drive so that they can copy the file into that contiguous space. Even after you run WinContig/Defraggler, you may not be able to copy over another large file and make it contiguous (even though there is enough free space on the drive) - see this post for details. Defraggler has an option to 'Defrag Free Space' which will fix this problem.

        This Defraggler map shows that the free clusters are not in one contiguous block. See here for more details.

To make a file contiguous,WinContig has to create a new file that is contiguous before it can delete the old non-contiguous file. Thus we need some contiguous free space on the drive that is the same size or larger than the size of the file we are trying to defragment. So for a 3GB file, we will need at least 3GB of contiguous free space on the same drive.

A file in a volume exists as a number of clusters (chunks of data). For example, a typical cluster size on an NTFS volume is 4K or 8 sectors. So a 10K file would occupy 3 clusters:

Cluster 1 = first 4K
Cluster 2 = 2nd 4K
Cluster 3 = 3rd 4K cluster (only first 2K of which has valid data)

These clusters can be anywhere within the volume. So they could be at cluster no 6,7 and 8 or they could be at cluster no. 3234, 44564 and 332!

A utility such as WinContig will rearrange the clusters within a file (if it can). So in the previous example, we might end up with the file consisting of cluster no.s  3234, 3235 and 3236 and so the file is contiguous and has sequential cluster numbers.

Recently, a user on reboot.pro had a problem. He had a 6GB VHD file on an 8GB NTFS-formatted USB drive. He ran WinContig but it would not make the file contiguous. Even copying the file to a freshly formatted 8GB NTFS drive did not work, the file was always non-contiguous.

It turns out that the reason for this is that when you format an NTFS volume, the Master File Table (MFT) is placed at the 3GB position within the volume (if the volume is over about 5GB). So on a freshly formatted 8GB volume, we have

(3GB of free space)
$MFT  (NTFS 'directory')
(4.7GB approx. of free space)

So we can see that there is no way we can store a 6GB sequential file with the MFT placed at the default 3GB position.

As the file is greater than 4GB, we cannot use a FAT32 filesystem (as FAT32 does not support files greater than 4GB).

You can see this if you use a utility such as Auslogics defrag tool which shows a map of the used clusters and what files occupy which areas of the disk.

Piriform's Defraggler is another good tool for displaying fragmented files and analyzing the file layout on a drive. It can also defragment individual files too (right-click in Explorer) and also offers to delete files in the Recycling Bin before defragging.

Alternatively, you can boot to grub4dos from the USB drive, go to the grub4dos shell (press c in the grub4dos menu) and then use the blocklist command to see how many fragments you have and where they are located - e.g.



So how can we make an 8GB USB flash drive containing a 6GB contiguous file?

Well, Wonko the Sane (from reboot.pro) came up with the idea of making a small NTFS volume and then re-sizing it (expand it), thus leaving the MFT in the same place (as it is not normally moved when resizing).

Here is how to make a bootable 8GB USB drive containing a 6GB contiguous file using the partitioning tool EaseUS Home Partition Master (EHPM):

1. Erase all ptns on the 8GB flash drive
2. Make a small 20MB NTFS PRIMARY ptn using EHPM - or RMPrepUSB if you want a special bootloader
3. Re-Size the ptn using EHPM to ALMOST the full drive capacity - e.g. 7.8GB
4. Now add a small 2nd FAT PRIMARY partition (this is to improve boot compatibility with some BIOSes - the ptn is not actually used)
5. Copy over your large 6GB file and check it is contiguous using WinContig.

If you have Vista or Win7/8, then you can use Disk Manager instead of EaseUS Home Partition Master.

The whole discussion can be found on reboot.pro here.

Having trouble still? See also my other blog article here.







Recommended: SanDisk Extreme Pro USB 3.1 (#ad)

Monday 14 January 2013

Identify Unknown Devices in Device Manager

Came across a useful utility (UnknownDevices.exe  Dec 2012 version) by HalfDone which is intended to be run on a freshly-installed Windows system.

It looks at Device Manager (registry) entries and attempts to identify all the unknown devices which don't have drivers by using a database. It works on XP or later.
It also shows the Windows Product Key and lists a history of disk devices ever connected (inc. USB devices).
This is a useful addition for your toolbox!

As it relies on a database which needs to be updated as new hardware is released, you will need to get the latest version from the forum here.



Thursday 10 January 2013

fun with grub4dos batch files!

I have written a few new batch files which can be called by grub4dos - see here.

FindFullFileName.g4b - finds the first file matching a full filename
FindFileName.g4b - finds the first file matching a filename (without extension)
FindFileExt.g4b - finds the first file matching a file extension
title FindFileExt on mapped HDD Image
map  (bd)/harddisk.img (hd2)
map --hook
root (hd2,0)
# look for a file with a .com extension - param1=start folder   param2=extension
(bd)/grub/FindFileExt.g4b / .com
if not "%FILEPATH%"=="" echo FILE FOUND AT %FILEPATH%! 
if "%FILEPATH%"==""  echo No file with matching extension found!
pause
root
(more commands here)
Please download FindFile.zip to obtain these batch files.

Sunday 30 December 2012

Version 2.1.654 released as full version

The 'full release' version was getting a bit long in the tooth, so I have updated it with the latest version.
Changes can be read at http://www.rmprepusb.com/documents/release-2-0/version-history.
If you click on the Help (F1) button and click on the update box, the new version will be downloaded. You must then click on the downloaded file to install it manually.

Saturday 29 December 2012

Easy2Boot tutorial updated

I have included the AutoLinux code from Tutorial #96 into the Easy2Boot Tutorial #72.
I have also tested over 30 ISOs using the 'partnew' technique used in these tutorials and with 98% success; only the Trinity Rescue Disk ISO failed to work correctly.
Even DOS based ISOs just worked fine.
This allows you to just copy any ISO onto your Easy2Boot USB drive and try it. The menu is automatically made as the USB drive boots.

Tuesday 18 December 2012

Automatic grub4dos Linux ISO boot menu entry

Tutorial 96 shows how to add a grub4dos menu entry that will automatically create a new dynamically-created grub4dos menu in a ramdrive and list all your linux ISO files. You can then choose one of them and boot from it.

Thus means that you should be able to quickly try any linux ISO that you fancy without needing to make a special menu entry for each one. Just download the ISO file and copy it to the folder on your grub4dos bootable drive. Then boot from the drive and chose the Linux ISO menu entry - all the ISO files in a folder will be listed (as shown below) and you should be able to boot from any one of the ISOs.

Even a BackTrack 5 iso will just work!



Thursday 13 December 2012

Tails you win! A new method for booting linux from an ISO file!

I recently came across a post on reboot.pro by cdob on how to map an ISO file to a partition using grub4dos. This technique has the advantage that it should work for most linux ISOs, even the ones that don't support booting from an ISO file!
It also can get around the problem of booting a version of linux from an NTFS boot drive, even if that linux does not understand or support the NTFS filesystem.
This means that even if your USB grub4dos boot drive is formatted as NTFS, you can boot nearly any linux ISO from it!

Cool!

I tried this out using a Tails linux ISO file (which at the time I could not find a way to boot from an ISO file) and it worked a treat.

You can even boot from Ophcrack ISO file AND access the rainbow tables (no need to extract the rainbow tables onto the USB boot drive!).

If you have a linux ISO that you cannot get booting as an ISO file from a grub4dos boot pen/hdd, try this technique!

See http://www.rmprepusb.com/tutorials/tails for details.

See also here for booting Tails 3.16 from a USB HDD.

Wednesday 5 December 2012

grub4dos and the blocklist command

It has always been there, but I have just found that the grub4dos blocklist command can be used to display the groups of contiguous sectors that make up a file. So you can use this command to check if an ISO file (for instance) is contiguous (and can therefore be directly mapped under grub4dos using map /xxx.iso (0xff)) or if it is not contiguous.
The file pe.bs is 512 bytes long and thus occupies one sector on the disk. The file knoppix511.iso however is split into two contiguous sector 'runs', one starting at block 24856 (1425152 sectors long) and the other at 1450616 (976 sectors long).
WinContig is included in RMPrepUSB and can be used to make all files on the drive contiguous if you run into this problem.