how to manually install a lenny/sid live CD

Share your own howto's etc. Not for support questions!
Post Reply
Message
Author
User avatar
MeanDean
Posts: 3953
Joined: 2007-09-01 01:14

how to manually install a lenny/sid live CD

#1 Post by MeanDean »

* I will be using /dev/hda5 which is formatted with ext3, adjust according to your situation.

#boot your customcd image

#set root passwd
sudo passwd

#change to root
su

#set the user passwd
passwd user

#create a mount point
mkdir /hda5

#mount the partition
mount /dev/hda5 /hda5

#copy the system over, exclude a few things
rsync -a / /hda5/ --exclude=/{hda5,live,sys,proc,media}/

#create proc, sys, and media folders
mkdir /hda5/proc /hda5/sys /hda5/media

#chroot into partition
chroot /hda5/

#install grub - will only setup grub for this installation
grub-install hd0
update-grub


#remove fstab
rm /etc/fstab

#create new fstab (example below)
nano /etc/fstab

#exit chroot
exit

#reboot
reboot


#/etc/fstab example

Code: Select all

proc           /proc            proc    defaults        0       0
/dev/hda5       /              ext3    defaults        0       1
Last edited by MeanDean on 2008-11-21 03:36, edited 20 times in total.

User avatar
Bro.Tiag
Posts: 1937
Joined: 2007-06-02 19:14

#2 Post by Bro.Tiag »

'bout time you posted this over here. You really did not think I was going to do it for you did you? :D

Cheers

User avatar
MeanDean
Posts: 3953
Joined: 2007-09-01 01:14

#3 Post by MeanDean »

Ya got me, I wanted you to get the blame!

Nah, just wanted to test it a while. I also hoped they would have the installer in the livecd by now and this would not be needed.

User avatar
MeanDean
Posts: 3953
Joined: 2007-09-01 01:14

#4 Post by MeanDean »

updated....who knows how long it will be applicable

the theory is always the same though, boot live, copy everything over to a partition except what should not be copied (like proc,sys, and maybe media and so forth), chroot into the partition and install grub if needed, edit fstab to be normal...

thats all folks

oompa
Posts: 25
Joined: 2008-11-14 15:39

#5 Post by oompa »

Being lazy and liking added readability to ease comprehension, I was wondering if there were a specific reason for not using the following syntax :

used syntax:
rsync -a / /hda5/ --exclude=/hda5/ --exclude=/live/ --exclude=/sys/ --exclude=/proc/ --exclude=/media/
alternative syntax:
rsync -a / /hda5/ --exclude=/{hda5,live,sys,proc,media}/

User avatar
MeanDean
Posts: 3953
Joined: 2007-09-01 01:14

#6 Post by MeanDean »

yup there is a reason.....I did not know you could do that. Thank you!

User avatar
Bro.Tiag
Posts: 1937
Joined: 2007-06-02 19:14

#7 Post by Bro.Tiag »

oompa wrote:Being lazy and liking added readability to ease comprehension, I was wondering if there were a specific reason for not using the following syntax :

used syntax:
rsync -a / /hda5/ --exclude=/hda5/ --exclude=/live/ --exclude=/sys/ --exclude=/proc/ --exclude=/media/
alternative syntax:
rsync -a / /hda5/ --exclude=/{hda5,live,sys,proc,media}/
So something like this could be added to a custom LiveCD. Say as a bash script, maybe with a basic gtk-gui front end (I know how some like gui's). Ask a few simple questions, like where to put it & where to install grub to, and there you have it. A way to install the Live OS to a hard drive.

Cheers

oompa
Posts: 25
Joined: 2008-11-14 15:39

#8 Post by oompa »

MeanDean wrote:yup there is a reason.....I did not know you could do that. Thank you!
I'm happy to have provided you with a "A-ha, didn't know you could do that!" moment, there might be more where it came from. IIRC I learned that trick during a tutorial about zsh I've done after reading zsh: The last shell you’ll ever need!, the tutorial featured a link to Learn 10 good UNIX usage habits.
You might be interested in the follow-up:Learn 10 more good UNIX usage habits.

User avatar
fenario
Posts: 6
Joined: 2009-02-21 01:55

#9 Post by fenario »

Hi Mean Dean

I followed your recipe, but
there is no command; rsync on this debian-live-500-i386-standard.iso
I had to use cp -r instead
did anything miss out because of that?
because setting the passwords was useless.
now i have the system on the hard drive.
trying to mount a flashdrive, that has the xserver files on it.
nay to create a directory first: sudo mkdir /media/usb
I get an answer > sudo: must be setuid root
what's the meaning?
I do: su
password: ......i don't know. The one I set is not accepted. What is the default root password?
how can I install anything without being able to sudo.?

greetings

fen

clem
Posts: 4
Joined: 2009-07-11 13:24

Re: how to manually install a lenny/sid live CD

#10 Post by clem »

fenario: Check your APT sources (in /etc/apt/sources.list):

Code: Select all

deb http://ftp.debian.org/debian lenny main contrib non-free
Then refresh your cache and install rsync:

Code: Select all

apt-get update
apt-get install rsync
Clem.

clem
Posts: 4
Joined: 2009-07-11 13:24

Re: how to manually install a lenny/sid live CD

#11 Post by clem »

As we're experimenting with a Debian edition of Linux Mint (based on Debian testing), I started working on a graphical installer for Debian Live.

MeanDean, it's based on your instructions. I also added commands to change the hostname, username, password, etc.. I'll add features to it incrementally. You're welcome to look at the source code, fork it and submit ideas/patches:

http://github.com/linuxmint/mint-debian-installer

To clone the GIT source tree:

sudo apt-get install git-core
git clone git://github.com/linuxmint/mint-debian-installer.git
cd mint-debian-installer

Then you can make all the changes you want...

To test the installer: "sudo ./test"

To build the DEB packages for it: "apt build"

To generate a pot file (say, to upload to Launchpad translations for instance): "./makepot"

The main python script is in usr/lib/linuxmint/mint-debian-installer/mint-debian-installer.py
The GUI is done with Glade and it's located in usr/lib/linuxmint/mint-debian-installer/mint-debian-installer.glade

Debs are pushed towards "deb http://packages.linuxmint.com debian main upstream import" (stable) and ""deb http://packages.linuxmint.com debian romeo" (unstable). The package name is "mint-debian-installer", although to be honest it's likely to change, to loose its Mint branding, and to get a more sexy name :)

Clem.

gnudude
Posts: 1712
Joined: 2009-04-05 17:30
Location: gone....

Re:

#12 Post by gnudude »

damn that meandean is slow to respond....bastard.... :roll:
fenario wrote: there is no command; rsync on this debian-live-500-i386-standard.iso
I had to use cp -r instead
did anything miss out because of that?
probably...if you have net access then just install rsync
what's the meaning?
something is fubar
I do: su
password: ......i don't know. The one I set is not accepted. What is the default root password?
how can I install anything without being able to sudo.?
When you were running it as a livecd, then you should of been able to do sudo passwd or sudo su and then set a password, after you copied it over to the system it should remain the same as whatever you changed it to.

gnudude
Posts: 1712
Joined: 2009-04-05 17:30
Location: gone....

Re: how to manually install a lenny/sid live CD

#13 Post by gnudude »

clem wrote:As we're experimenting with a Debian edition of Linux Mint (based on Debian testing), I started working on a graphical installer for Debian Live.
Why not just use the debian installer and tweak it. That is what I had been doing with refracta (my own little crappy distro)
MeanDean, it's based on your instructions.
at your own risk :P
I also added commands to change the hostname, username, password, etc.. I'll add features to it incrementally. You're welcome to look at the source code, fork it and submit ideas/patches:
I will certainly take a look. Seems interesting and might be useful as well. Thanks a bunch.


gnudude aka meandean aka souneedalink aka nrvitsquad aka deanlinkous aka ....cant think of the rest of them

clem
Posts: 4
Joined: 2009-07-11 13:24

Re: how to manually install a lenny/sid live CD

#14 Post by clem »

Why not just use the debian installer and tweak it.
Ah no.. it's much more fun to start things from scratch... and there's a lot of things I plan to add in there, so I'd rather be at home in my own code :)

I tested 1.0.1 and it's now functional. Extremely rough, but functional :)

Clem.

clem
Posts: 4
Joined: 2009-07-11 13:24

Re: how to manually install a lenny/sid live CD

#15 Post by clem »

Oh by the way, I also made mintconstructor (a forked version of "reconstructor") compatible with Debian Live:

http://github.com/linuxmint/mintconstructor/tree

It's happening in the "debian" branch.

I don't know if you've been doing things manually or with another tool for Refracta, maybe this, or part of it, could help.

Clem.

gnudude
Posts: 1712
Joined: 2009-04-05 17:30
Location: gone....

Re: how to manually install a lenny/sid live CD

#16 Post by gnudude »

clem wrote: Ah no.. it's much more fun to start things from scratch...
...and probably a lot smaller footprint as well, I think the debian installer (and everything it pulls in with it) adds about a 100mb of crap altogether....

I do all my customizing manually (don't do much customizing actually) but I do have a few scripts to do the repetitive, boring parts like unpacking/repacking a iso, unsquashing and squashing the filesystem, and so forth.

Thanks for the info and tools. I may have to check into them. Then again, I do like to do things from scratch for myself....much more fun ya know :wink:

gnudude
Posts: 1712
Joined: 2009-04-05 17:30
Location: gone....

Re: how to manually install a lenny/sid live CD

#17 Post by gnudude »

clem wrote:.... I started working on a graphical installer for Debian Live.
discussion thread for it is here

nealbirch
Posts: 6
Joined: 2010-02-03 05:23

Re: how to manually install a lenny/sid live CD

#18 Post by nealbirch »

I just used this with my an old pentium II 1.25 ghz with 1 gig ram, 60 gb hd which sits in my detached garage. I used the latest live lenny 5.04 cd. I've got a wireless usb G hooked into it, with wpa on my network that the debian install cd wouldn't connect to, but the live cd's always connected. (I'm not going to run a cat5 30+ ft and I'm too lazy to haul it all inside and hook it up when I have a perfectly good wireless network that it should be able to connect to.) I formatted the drive with 3 partitions, root, home and swap.

a couple of suggestions.

While booted into the live cd, install rsync and grub-pc before you copy the files. I set my sources.list at the same time.

after you chroot, along with the /etc/fstab, edit the /etc/gdm/gdm.conf file and the /etc/inittab to remove the auto login features. gdm really complains if you don't have a /home/user directory, lol. I also commented out getty's #3, 4 and 5 in the inittab because memory is tight and I rarely use them. grub-install and grub-setup worked fine.

I didn't think of the gdm and inittab until I booted into the system the first time, I hadn't set up the user password because I was going to delete that account, however both the gdm.conf and inittab have references to it. I was able to create a user in the root console and get logged in and google for a fix. While you are in the gdm.conf (goodness it's a long file!) you may also want to change the default sound player from play to aplay if you want a audio notification when it finishes loading gdm.

Thanks, everybody, this worked great!

jampola
Posts: 29
Joined: 2011-03-19 06:35
Location: Chonburi, Thailand / Melbourne, Australia

Re: how to manually install a lenny/sid live CD

#19 Post by jampola »

This thread is going on 5 years old but just an FYI, this method still works a charm.

Kudos to MeanDean! I think all of his info on live-builds and everything has saved my life. I am based in Thailand and my company has 60+ Debian pc's. I am heading home to Australia for a few months and made a bunch of recovery usb's to use if some of the pc's go pear shaped. I would use clonezilla but I find this way more elegant and user friendlier since some pc's aren't always connected to the network.

Thanks again!

Post Reply