Results 1 to 3 of 3

Thread: Boot BT with casper file (instead of partition).

  1. #1
    Just burned his ISO
    Join Date
    Feb 2011
    Posts
    4

    Default Boot BT with casper file (instead of partition).

    Hi.
    I just installed BT to my external HD.
    To the sdb1 partition I copied files from iso.
    On the sdb2 I created casper-rw file.

    How to modify grub to boot with casper-rw file?
    Or, what else I need to do?

    Thanks.

  2. #2
    Developer balding_parrot's Avatar
    Join Date
    May 2007
    Posts
    3,399

    Default Re: Boot BT with casper file (instead of partition).

    Here are the notes I made when developing the save changes methods for BT4 whilst BT4 was still in the development stages.
    Please note, they are just notes, but they will give you enough info to fix your problem.
    Also remember the sizes I used were for a dev version of BT4 so will need changing.

    Just a couple of notes about your original post, by creating sdb2 you are already using a partition. This partition could be better used by the original method I wrote that uses a second partition rather than by the use of a casper-rw loopback file. The two partition method is far superior to the loopback file method in many ways.

    Anyway, here are my notes on the loopback file method.

    Code:
    root@bt:~# fdisk /dev/sda
    Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
    Building a new DOS disklabel with disk identifier 0xdd381bf3.
    Changes will remain in memory only, until you decide to write them.
    After that, of course, the previous content won't be recoverable.
    
    
    The number of cylinders for this disk is set to 1044.
    There is nothing wrong with that, but this is larger than 1024,
    and could in certain setups cause problems with:
    1) software that runs at boot time (e.g., old versions of LILO)
    2) booting and partitioning software from other OSs
       (e.g., DOS FDISK, OS/2 FDISK)
    Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)
    
    Command (m for help): n
    Command action
       e   extended
       p   primary partition (1-4)
    p
    Partition number (1-4): 1
    First cylinder (1-1044, default 1):
    Using default value 1
    Last cylinder, +cylinders or +size{K,M,G} (1-1044, default 1044):
    Using default value 1044
    
    Command (m for help): a
    Partition number (1-4): 1
    
    Command (m for help): t
    Selected partition 1
    Hex code (type L to list codes): b
    Changed system type of partition 1 to b (W95 FAT32)
    
    Command (m for help): w
    The partition table has been altered!
    
    Calling ioctl() to re-read partition table.
    
    WARNING: If you have created or modified any DOS 6.x
    partitions, please see the fdisk manual page for additional
    information.
    Syncing disks.
    Code:
    root@bt:~# mkfs.vfat -F 32 -n BT4 /dev/sda1
    mkfs.vfat 2.11 (12 Mar 2005)
    Code:
    root@bt:~# mkdir /mnt/sda1
    root@bt:~# mount /dev/sda1/ /mnt/sda1/
    Code:
    root@bt:~# cp -R /media/cdrom/* /mnt/sda1/
    In the next command casper-rw is the Loopback File that will hold the changes
    It MUST be called called casper-rw no other name can be used and it must not contain caps.
    4000 is the size in MB of casper-rw, bear in mind that as this is a FAT32 partition there is a
    4GB (4096MB) filesize limit. But a larger casper-rw should work on an ext2/3 filesystem
    .

    Code:
    root@bt:~# dd if=/dev/zero of=/mnt/sda1/casper-rw bs=1M count=4000
    4000+0 records in
    4000+0 records out
    4194304000 bytes (4.2 GB) copied, 42.436 s, 98.8 MB/s
    Code:
    root@bt:~# mkfs.ext3 /mnt/sda1/casper-rw
    mke2fs 1.41.3 (12-Oct-2008)
    /mnt/sda1/casper-rw is not a block special device.
    Proceed anyway? (y,n) y
    Filesystem label=
    OS type: Linux
    Block size=4096 (log=2)
    Fragment size=4096 (log=2)
    256000 inodes, 1024000 blocks
    51200 blocks (5.00%) reserved for the super user
    First data block=0
    Maximum filesystem blocks=1048576000
    32 block groups
    32768 blocks per group, 32768 fragments per group
    8000 inodes per group
    Superblock backups stored on blocks:
            32768, 98304, 163840, 229376, 294912, 819200, 884736
    
    Writing inode tables: done
    Creating journal (16384 blocks): done
    Writing superblocks and filesystem accounting information: done
    
    This filesystem will be automatically checked every 20 mounts or
    180 days, whichever comes first.  Use tune2fs -c or -i to override.
    Code:
    root@bt:~# grub-install --no-floppy --root-directory=/mnt/sda1/ /dev/sda
    Probing devices to guess BIOS drives. This may take a long time.
    Due to a bug in xfs_freeze, the following command might produce a segmentation
    fault when /mnt/sda1//boot/grub is not in an XFS filesystem. This error is harmless and
    can be ignored.
    xfs_freeze: specified file ["/mnt/sda1//boot/grub"] is not on an XFS filesystem
    Installing GRUB to /dev/sda as (hd0)...
    Installation finished. No error reported.
    This is the contents of the device map /mnt/sda1//boot/grub/device.map.
    Check if this is correct or not. If any of the lines is incorrect,
    fix it and re-run the script `grub-install'.
    
    (hd0)   /dev/sda
    Code:
    root@bt:~# nano /mnt/sda1/boot/grub/menu.lst
    




    Edit these two sections to make persistent changes mode the default and to fix the typo, then save.

    Code:
    # By default, boot the first entry.
    default 3
    
    title                Start Persistent Live CD
    kernel                /boot/vmlinuz BOOT=casper boot=casper persistent rw quiet
    Code:
    root@bt:~# reboot  
    You will get this at boot:

    end_request: I/O error, dev fd0, sector 0

    repeated about 10 times.

    It's normal and appears to only be casper-rw being searched for, but as there is no floppy in the drive an I/O error is reported.
    Last edited by balding_parrot; 02-22-2011 at 12:53 AM. Reason: added extra info

  3. #3
    Just burned his ISO
    Join Date
    Feb 2011
    Posts
    4

    Default Re: Boot BT with casper file (instead of partition).

    Thanks.
    It works.

Similar Threads

  1. Boot BT4 from ISO on NTFS partition
    By thunder9861 in forum Beginners Forum
    Replies: 10
    Last Post: 03-02-2011, 09:53 PM
  2. Replies: 4
    Last Post: 02-24-2011, 04:52 PM
  3. BT3 Dual Boot on 1 Partition
    By V9nqu!5h in forum OLD Newbie Area
    Replies: 9
    Last Post: 04-03-2009, 06:58 AM
  4. Partition and file recovery?
    By MissingThyme in forum OLD Newbie Area
    Replies: 5
    Last Post: 09-27-2007, 08:24 AM
  5. FSTAB, Hostname, and Boot Partition?
    By The Captain in forum OLD Newbie Area
    Replies: 12
    Last Post: 08-16-2007, 01:06 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •