LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-05-2012, 04:02 PM   #1
ElectroPulse
LQ Newbie
 
Registered: Feb 2012
Posts: 9

Rep: Reputation: Disabled
Help With Creating a Debian LiveCD USB Drive


Hello, all!

Alright, here's the deal. I am wanting to make a Debian LiveCD USB Drive to give to my friend to run Minecraft on his laptop. A couple of reasons for wanting to do this are: 1. Linux is a lot less resource-hungry than Windows, so it could potentially run faster. 2. For some reason, Minecraft just won't start on his computer (at all... we're not sure why).

Anyway, if it improves the speed at which Minecraft can run, some of the other guys in the dorm may want to try this out.

Alright, so here's my question: I have created a LiveCD ISO file (using Remastersys) and used Unetbootin to install it on a flash drive. When I booted from it, I was watching the text fly by at bootup, and noticed that it mentioned Virtualbox... I am wondering if there is a way to set up an OS without it having any traces of the machine I set it up on. I would also want it to do what a normal LiveCD would do when it first boots up... scan the computer's hardware to detect what it has, and set itself up for that hardware (like screen resolution, as well as recognizing the hardware it has).

One thing that I noticed when I tried running Minecraft from the USB Drive was that it was as slow as when I tried running it in Virtualbox... My computer runs it just fine under Windows... I am wondering if this has to do with it not recognizing some hardware?

I would also like it to be persistent once it has been installed on a flash drive. For example, if someone changes the desktop background, I would like it to stay that way.

I would also like it to have some specific files/folders on the desktop when a user first logs in, as well as a folder in their /home/username folder.

Also, when I install it on a USB drive, I would like it to have the packages that I installed on it originally. For example, I plan on installing Java and LXDE. When I install the ISO on the drive, I would like these packages to be included.

One problem that I have heard of, that I would like to avoid, is Linux using a swap file... If it is running on a USB drive, I would prefer for this not to be enabled (as it would wear out the USB drive faster).


So, to recap, I would like to:
1. Create an ISO that functions like a LiveCD in that it checks the computer's hardware.
2. Include packages that I have installed.
3. Copy specified files to desktop as well as user's /home/username folder.
4. Once ISO has been installed onto flash drive, save all changes made under that install.
5. Not use Swap.

Any ideas how I would go about doing this? I am new to Linux, so pardon and newbishness that is coming out in the post... Also, well-documented instructions are strongly encouraged

P.S. Does Debian have most of the display/other hardware drivers built in? Or is there a package that needs to be downloaded to support the majority of hardware? (wondering because this could be run on a variety of machines)

P.P.S. I'm not sure how much carries over between distros when discussing LiveCDs, but from what I have seen it is quite a bit, so that's why I put it here rather than the Debian-specific forum.
 
Old 02-05-2012, 04:35 PM   #2
k3lt01
Senior Member
 
Registered: Feb 2011
Location: Australia
Distribution: Debian Wheezy, Jessie, Sid/Experimental, playing with LFS.
Posts: 2,900

Rep: Reputation: 636Reputation: 636Reputation: 636Reputation: 636Reputation: 636Reputation: 636
Check out the Debian Live page and read through ALL the information. Also subscribe to the mailing list as the document is a work in progress and is update occasionally to fill in pieces that are discovered by using DebianLive.

As for the drivers/firmware, you can install non-free on your live system but the one you download from Debian does not contain them.

So my suggestion is go and read the page I linked to, subscribe to the mailing list and read it as well, and ask questions on both sites.
 
Old 02-05-2012, 04:41 PM   #3
ElectroPulse
LQ Newbie
 
Registered: Feb 2012
Posts: 9

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by k3lt01 View Post
Check out the Debian Live page and read through ALL the information. Also subscribe to the mailing list as the document is a work in progress and is update occasionally to fill in pieces that are discovered by using DebianLive.

As for the drivers/firmware, you can install non-free on your live system but the one you download from Debian does not contain them.

So my suggestion is go and read the page I linked to, subscribe to the mailing list and read it as well, and ask questions on both sites.
Thanks for the reply!

I ran across that when I was searching, but it didn't appear to be a very new-user-friendly solution... I'll read through it and see if I can figure it out. Any potentially easier solutions are welcome!

When you said "you can install non-free on your live system" what did you mean? Are you meaning a non-free repository? What I am wondering for drivers is if there is some sort of driver package that can be installed that will recognize most hardware (without the need of internet). My friend is in a dorm without internet, so that is an important part of this.
 
Old 02-05-2012, 05:06 PM   #4
k3lt01
Senior Member
 
Registered: Feb 2011
Location: Australia
Distribution: Debian Wheezy, Jessie, Sid/Experimental, playing with LFS.
Posts: 2,900

Rep: Reputation: 636Reputation: 636Reputation: 636Reputation: 636Reputation: 636Reputation: 636
non-free is part of the Debian repository but it is not enabled by default. Unfortunately many driver/firmware packages are in non-free and to have your live system recognise most hardware means you must enable non-free and also tell Live Build to install them, or at the very least have them in a repository pool on the drive for installation later, so systems you come across will be able to use your live system.

EDIT: To be honest LiveBuild is not all that user friendly to begin with. It takes alot of trial and error and can max out your bandwidth usage.

EDIT: Another option for drivers/firmware is to build your own kernel (see the kernel link in my signature for an example) and enable in your own kernel every driver/firmware option you can. Once you have done this place your new kernel in the appropriate folder on config and it will build the system with the new kernel

Last edited by k3lt01; 02-05-2012 at 05:10 PM.
 
Old 02-05-2012, 07:58 PM   #5
ElectroPulse
LQ Newbie
 
Registered: Feb 2012
Posts: 9

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by k3lt01 View Post
non-free is part of the Debian repository but it is not enabled by default. Unfortunately many driver/firmware packages are in non-free and to have your live system recognise most hardware means you must enable non-free and also tell Live Build to install them, or at the very least have them in a repository pool on the drive for installation later, so systems you come across will be able to use your live system.

EDIT: To be honest LiveBuild is not all that user friendly to begin with. It takes alot of trial and error and can max out your bandwidth usage.

EDIT: Another option for drivers/firmware is to build your own kernel (see the kernel link in my signature for an example) and enable in your own kernel every driver/firmware option you can. Once you have done this place your new kernel in the appropriate folder on config and it will build the system with the new kernel
Ah, ok, I'll try that! EDIT: Hmmm... the way you said it I thought there'd be some sort of wizard where it would say "select the drivers from the following list that you would like to include" or something, lol... Do you have any suggestions of a good, easy-to-understand (for a Linux newbie) tutorial? I will be looking around for some... at first glance, they seem to be quite difficult to understand (for me).

Ok, so I am thinking that I've pretty much got the LiveCD worked out... I have one more thing I am trying to solve, then I'll try it out (the first trial was a success... that is, making an ISO with packages that I have chosen. Now I just need to sort out the last item, then try that one out).

That one thing is: Making certain files/folders copy to a user's /home/user folder, as well as to their desktop when that user is created. I have been searching through the "lb config" manual, and have seen nothing to do this... Does anyone happen to know how to accomplish this?

EDIT: It seems that I have found a potential solution... is there a way to make the installer (I am including the debian-installer so that it can be put on other flash drives) configure flash drives with 2 partitions automatically? One that has pretty much everything else stored on it, and the second partition named "home-rw" (with specific files in the "home-rw")? It appears that when the device is booting, if there is a second partition named "home-rw" it will mount that as the /home folder, which would be a solution to my problem.

Last edited by ElectroPulse; 02-05-2012 at 08:24 PM.
 
Old 02-05-2012, 09:11 PM   #6
k3lt01
Senior Member
 
Registered: Feb 2011
Location: Australia
Distribution: Debian Wheezy, Jessie, Sid/Experimental, playing with LFS.
Posts: 2,900

Rep: Reputation: 636Reputation: 636Reputation: 636Reputation: 636Reputation: 636Reputation: 636
Quote:
Originally Posted by ElectroPulse View Post
Do you have any suggestions of a good, easy-to-understand (for a Linux newbie) tutorial?
There are tutorials in the manual that are good for a beginner, it is when you start going past what they do that things get a bit tricky. As far as I am aware no one has sat down to write an easy tutorial for Live Build. The best I can suggest is you follow my previous suggestion and also read the man pages. Actually install dwww and that will give you offline access to the man pages.
Quote:
Originally Posted by ElectroPulse View Post
That one thing is: Making certain files/folders copy to a user's /home/user folder, as well as to their desktop when that user is created. I have been searching through the "lb config" manual, and have seen nothing to do this... Does anyone happen to know how to accomplish this?
Chapter 9.1.1 Live/chroot local includes discusses how to do this.
Quote:
Originally Posted by ElectroPulse View Post
EDIT: It seems that I have found a potential solution... is there a way to make the installer (I am including the debian-installer so that it can be put on other flash drives) configure flash drives with 2 partitions automatically? One that has pretty much everything else stored on it, and the second partition named "home-rw" (with specific files in the "home-rw")? It appears that when the device is booting, if there is a second partition named "home-rw" it will mount that as the /home folder, which would be a solution to my problem.
I don't know if d-i (Debian Installer) can "create" a persistent /home on a flash drive. There are other tools for that, check out PendriveLinux.
 
Old 02-05-2012, 09:20 PM   #7
ElectroPulse
LQ Newbie
 
Registered: Feb 2012
Posts: 9

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by k3lt01 View Post
There are tutorials in the manual that are good for a beginner, it is when you start going past what they do that things get a bit tricky. As far as I am aware no one has sat down to write an easy tutorial for Live Build. The best I can suggest is you follow my previous suggestion and also read the man pages. Actually install dwww and that will give you offline access to the man pages.
Chapter 9.1.1 Live/chroot local includes discusses how to do this.
I don't know if d-i (Debian Installer) can "create" a persistent /home on a flash drive. There are other tools for that, check out PendriveLinux.
Alright, thanks for the response

For the how-to, I was asking for one about building a kernel... They all seem to be beyond my understanding currently.

As for 9.1.1, I had seen that section, but the name didn't give any indication of what it was... I'll look into that, thanks!

Hmm... just glancing at the screen captures of Pendrive Linux, it doesn't appear that there are options for creating other partitions... I need to head to bed now, so I'll check it out more in-depth tomorrow.

Thanks!
 
Old 02-05-2012, 10:29 PM   #8
k3lt01
Senior Member
 
Registered: Feb 2011
Location: Australia
Distribution: Debian Wheezy, Jessie, Sid/Experimental, playing with LFS.
Posts: 2,900

Rep: Reputation: 636Reputation: 636Reputation: 636Reputation: 636Reputation: 636Reputation: 636
Quote:
Originally Posted by ElectroPulse View Post
For the how-to, I was asking for one about building a kernel... They all seem to be beyond my understanding currently.
Sorry brain fade, I misunderstood even though what you said is straight forward. I'll blame starting full time (more than actually) study for that boo boo.

Ok, here is what I have been doing with the kernel. and it is taken from various sites but mostly this one with corrections from the person who commented plus some corrections of my own on the comments because he made some minor mistakes to.

1. Install the tools required.
Code:
apt-get install build-essential ncurses-base ncurses-dev fakeroot kernel-package
2. Get the chosen kernel from kernel.org , I usually get the latest stable but I sometimes get the latest rc version.

3. Unpack the source you just downloaded.
Code:
tar xvjf linux-[version].tar.bz2
or you can use Archive Manager to unpack it for you. I usually do it to a special folder called Linux either on the Desktop or in my /home folder.

4. Go into the directory you just unpacked. My command would be something like
Code:
cd /home/michael/Desktop/Linux/linux-3.3.0-rc2
5. Make a new config. Ok you can use a config that is already on your system (really good idea) or make your own from scratch (really bad idea for a learner). To make one based on a pre-existing one open your file manager and go to /boot in /boot you will see files starting with config- choose what one you want to use (there may only be one there may be more) and type this into a terminal (adjust the code to suit your kernel)
Code:
cp /boot/config-3.2.0-2.dmz.1-liquorix-amd64 .config
6. Now type
Code:
make menuconfig
and this will bring up a little screen where you can go through and change or add options that were previously not either install or made as modules. Now apparently modules are a better option and this is because the kernel will only load the modules it needs.

7. Preparing the root environment
Into your terminal type
Code:
fakeroot make-kpkg clean
8. Make your kernel
In your terminal type
Code:
fakeroot make-kpkg --jobs=2 --initrd --append-to-version=-cobber --revision=20120204 kernel_image kernel_headers modules_image
The bits in italics can (and should) be changed by you to suit your system. The --jobs=2 is simply for the number of jobs being sent to your cpu at any one time. If you have a dual core use =2 if you have a quad core use =4 otherwise leave --jobs=2 out. The --append-to-version=-cobber is where your add your identifier. I have -cobber to identify my kernel for Cobber which I am working on building so you should change it to suit your naming system. The --revision=-20120204 is best being either the date or some other numeral indicating what version number you are working on. Some people have the date others will put a simple version number like -2 or -4. I like the date and I tend to follow the yyyymmdd formula although that may change once Cobber is released for testing.

Once you have done that wait for it to finish building the kernel and it will be built in the folder you started at. One more thing, making a kernel is also very trial and error, you will have more than one go at it to get what you want but each attempt make a note at the things you change and what effect it has so you can see if it was a good change or a bad one.

If you have any other questions just ask and I will do my best to help where I can.
 
Old 02-06-2012, 05:42 PM   #9
ElectroPulse
LQ Newbie
 
Registered: Feb 2012
Posts: 9

Original Poster
Rep: Reputation: Disabled
Ah, tyvm for the step-by-step instructions! I'll try that out and let you know how it turns out
 
Old 02-06-2012, 07:58 PM   #10
ElectroPulse
LQ Newbie
 
Registered: Feb 2012
Posts: 9

Original Poster
Rep: Reputation: Disabled
Lol... I just went through your instructions, and when I got to the part where it actually makes it, there were a bunch of y/n questions and I had NO idea what any of them meant... I think I'll hold off on the idea of making a kernel for a while... Do you happen to know of any pre-built kernels that are designed for compatibility?
 
Old 02-06-2012, 10:22 PM   #11
k3lt01
Senior Member
 
Registered: Feb 2011
Location: Australia
Distribution: Debian Wheezy, Jessie, Sid/Experimental, playing with LFS.
Posts: 2,900

Rep: Reputation: 636Reputation: 636Reputation: 636Reputation: 636Reputation: 636Reputation: 636
The only other kernel I would use is the liquorix kernel.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
I own a laptop without a hard drive. What's the fastest livecd/usb/whatever solution? treewojima Linux - General 6 12-26-2011 09:06 AM
Install slackware on a USB drive without creating an USB livecd Barx Slackware 4 06-28-2010 02:31 PM
Installing Debian on USB Hard Drive/USB Jump Drive kushalkoolwal Debian 10 02-26-2009 02:46 PM
accessing USB drive in Redhat 9 and then creating USB boot disk Fond_of_Opensource Linux - Hardware 1 04-15-2007 08:43 AM
Creating/restoring drive image on USB drive OneSeventeen Linux - Newbie 9 07-06-2005 06:08 AM


All times are GMT -5. The time now is 11:06 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration