Note: Almost all content here will eventually be revised and merged into the live-manual. Please do not add new content to the wiki, but contribute to the manual directly.

In some situations, it can be beneficial to mount a local disk partition for use in the Live environment (see DebianLive/Howto/Local_Swap_File). In keeping with the ideals of the DebianLive project, the code needs make little or no assumptions about the hardware it is running on.

The following example is not perfect for all situations, but can be easily modified to suit your specific needs.

{{{mkdir -p /localdisk # Set the first Linux formatted partition found to a variable. # Note: this behavior may not be suitable in all situations. strMountDev=$(fdisk -l | grep -m 1 "Linux" | cut -d" " -f1) # Test for a clean file system on the partition to be mounted. fsck -C -a $strMountDev # Mount the drive to the newly created folder. mount -v $strMountDev /localdisk # Make a directory for the Live environment on the mounted drive. # This is a safety precaution so that we are not working in the # root of the mounted file system. mkdir -p /localdisk/netboot}}}

To make this happen automatically at boot, see this FAQ.