Results 1 to 3 of 3

Thread: How to make a Debian Live CD USB Drive

  1. #1
    Join Date
    May 2012

    How to make a Debian Live CD USB Drive

    I have PC with Debian installed in it as the primary operating system in it. I play Simutrans on my system. Now I have to go to my uncle’s house for some days where I am going to stay for some days. He has a PC in which Windows 7 is installed. As I will be living for short period of time, I think that installing Debian on his computer will be troublesome. Before I go there, I installed a virtual machine on his Windows 7 and installed Debian using it. But the performance of Debian in Virtual machine was very slow as compared to its boot version. Running the Simutrans was a very bad experience on it. I don’t know how it happened, but Debian doesn’t need large amount of resources like Windows does. I created a Live CD of Debian on an USB pen drive using Unetbootin. It created a bootable version of Debian on my pen drive, but the problem happened that it was unable to connect to the internet. Also all the settings in it were set to default, it failed to recognize the hardware and adjust itself to the computer. Yes, I was able to correct it manually, but it is tedious to change every setting every time I start it in the computer.

    My question is that I want to create a Debian Live CD on pen drive which will connect to internet properly, will work as it is been installed on the computer without having to manually adjust the settings on every boot. It will connect itself with the hardware and adjust the screen resolution and other settings itself. Also If I change the desktop background, theme or any other such settings regarding the looks of the operating system, it should be preserved when I start the system again. Also I have some useful files in the system which is related to my work. I would like to store them in pen drive and when it is connected to the system, along with the installation of Debian, it should also get copied in the host computer and should be accessible in the new system. My work is regarding JAVA and LXDE. So if I plug my pen drive with bootable Debian in it, I will need to install it. I want the bootable Live CD of Debian to work such that it will install JAVA and LXDE automatically.

    Can somebody tell me if such a system as I have described is possible. If yes, then how do I make it? Also if anybody knows how to make the required system works without using swap file technique.

  2. #2
    Join Date
    Feb 2012

    Re: How to make a Debian Live CD USB Drive

    It is possible to create a bootable version of Debian in an USB pen drive. Though it might not fulfill all your requirements, it is worth a try.
    1) To achieve the bootable version of Debian, you will need to create a new kernel which will boot the system in the desired manner. For creating the base of the kernel, you will need to add some tools that need to work along with it. To do it, enter the following code,
    apt-get install build-essential ncurses-base ncurses-dev fakeroot kernel-package
    2) Now you will need to get the stable boot kernel for booting of your kernel and its features at the startup. After downloading the stable kernel, you will need to unzip it and extract its components for use. You will need to extract the components in the home folder of your operating system.

    3) Now you will need to construct a new configuration for the kernel you are developing. You can even use the default configuration that is provided by the system, but it is preferable to create your own custom configuration to get a better control over your kernel. To establish the default configuration on the new kernel, you will need to go into file manager in the/boot folder. There you will need to search for files which have its name beginning with config. Depending on your system, it might show you multiple files with various configurations and attributes. To get the one which you need for your required system will need to be searched by using this command,
    cp /boot/config-3.2.0-2.dmz.1-liquorix-amd64 .config
    4) Now that you have create a boot version of your kernel, you will need to create a menu to select the required options and to change its settings if needed. See to it that you keep the menu small and only add items that you need. Type, make menuconfig, in your terminal and it will bring up a little screen on your desktop in which you can add options. It will have some options in it initially; you can remove them, replace them or change them as you want. It is better to have the modules as options in the menu rather than having items that will execute the modules as a part of the menu. Adding the modules to menu directly has its own advantage. If you add a client item, then at the startup the kernel will load every of them. But if modules are added, they won’t be executed at the startup except for few ones. They will only be loaded when required or when system or user demands. Also startup of the kernel will be faster with inclusion of modules. You will also need to prepare a root environment for the kernel. To create it, type the following command in the terminal,
    fakeroot make-kpkg clean
    5) Now that you have created booting technique, environment, menu and other required functions for your kernel, you will now need to create it. To create your designed kernel, use the following command,
    fakeroot make-kpkg --jobs=2 --initrd --append-to-version=-cobber --revision=20120204 kernel_image kernel_headers modules_image
    This is the base structure of the command for kernel creation which I have provided. It may be possible that this might not work as expected because I have given according to my system. You will need to edit few parameters of it or maybe some structural changes to suit it to your system.

    If you notice the command line I have given, then there is a ‘--jobs=2’ parameter in it. This parameter is used to denote the number of processes that your kernel can request the processor to follow at a time. I am using a dual core system and thus the value is two. If you are using an older processor than dual core, then I suggest you to skip that parameter from the command line. If you will be using this kernel on any other processor which is advanced than dual core ones, like quad core, then set the value of ‘--jobs’ to 4, that is ‘--jobs=4’. Again in the same command line, if you notice, then you will see a ‘--append-to-version=-cobber’ parameter. This parameter is needed to set the identifier to your kernel. I am using the Cobber as the identifier in my system and also to build the kernel. If you are using a different type of naming system in your system, then you will need to mention its name instead of Cobber in the command line. If in future you will be building another such kernel, then possibilities may be that you will need to modify this same kernel to suit the new needs. To differentiate between the both kernels, you will need to assign a version number to both of them. The parameter ‘--revision=-20120204’ you see in the command line describes it. You can change the umber that suits you to describe the version number for the kernel.

    Now that you have finished making the kernel, let the system finish accepting the changes and do some background processes it needs before finalizing the kernel. The kernel thus created will be saved in same folder that you began in, preferably the home folder of your system. I won’t guarantee you an error free or bug free kernel as its performance and behavior might change from system to system. But you can keep a note of the errors and bug it gives and try correcting them.

  3. #3
    Join Date
    Jun 2011

    Re: How to make a Debian Live CD USB Drive

    Since you are saying that the bootable Live CD version of the Debian operating system that you want to have on the pen drive should save the settings and adjust to the hardware of the host system. Then you will need to have drivers and firmware that will work along with the kernel you created. Since you mentioned that the version of Debian you are trying to install doesn’t adjust to the hardware of your uncle’s computer, it definitely needs to have firmware and drivers along with it. If you search on internet, then you will find many drivers and firmware that you can use. But I suggest that you go for the drivers and firmware that are available at a cost and not free.

    The reason is that many of the free ones are not built to be enabled automatically on startup. If you go for the free ones, then you will again need to build a kernel, which will execute them at the startup of your kernel.

Similar Threads

  1. Debian keeps windows 7 and make a dual bootmenu like ubuntu
    By Robert Beck in forum Operating Systems
    Replies: 5
    Last Post: 03-07-2011, 10:20 AM
  2. Debian - Loss of files from USB hard drive
    By Angelica Maria in forum Hardware Peripherals
    Replies: 6
    Last Post: 11-05-2010, 10:10 AM
  3. Debian Live CD with Gnat
    By Amy Adams in forum Operating Systems
    Replies: 4
    Last Post: 29-03-2010, 01:42 PM
  4. How to make a sata drive the main drive
    By Jannat in forum Operating Systems
    Replies: 3
    Last Post: 17-07-2009, 06:32 PM
  5. How to make a windows live CD?
    By Krupa in forum Windows Software
    Replies: 5
    Last Post: 19-03-2009, 07:16 PM

Posting Permissions

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