how to manually install a lenny/sid live CD

Share your own howto's etc. Not for support questions!

how to manually install a lenny/sid live CD

Postby MeanDean » 2007-09-06 20:46

* 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
MeanDean
 
Posts: 3953
Joined: 2007-09-01 01:14

Postby Bro.Tiag » 2007-09-06 20:49

'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
Bro.Tiag
 
Posts: 1937
Joined: 2007-06-02 19:14

Postby MeanDean » 2007-09-06 20:52

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

Postby MeanDean » 2008-04-15 16:37

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
User avatar
MeanDean
 
Posts: 3953
Joined: 2007-09-01 01:14

Postby oompa » 2008-11-20 12:14

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}/
oompa
 
Posts: 25
Joined: 2008-11-14 15:39

Postby MeanDean » 2008-11-20 13:26

yup there is a reason.....I did not know you could do that. Thank you!
User avatar
MeanDean
 
Posts: 3953
Joined: 2007-09-01 01:14

Postby Bro.Tiag » 2008-11-20 15:00

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
User avatar
Bro.Tiag
 
Posts: 1937
Joined: 2007-06-02 19:14

Postby oompa » 2008-11-21 03:46

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.
oompa
 
Posts: 25
Joined: 2008-11-14 15:39

Postby fenario » 2009-02-21 08:40

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
User avatar
fenario
 
Posts: 6
Joined: 2009-02-21 01:55

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

Postby clem » 2009-07-11 13:28

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

Postby clem » 2009-08-06 10:32

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.
clem
 
Posts: 4
Joined: 2009-07-11 13:24

Re:

Postby gnudude » 2009-08-06 12:06

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

Postby gnudude » 2009-08-06 12:17

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
gnudude
 
Posts: 1712
Joined: 2009-04-05 17:30
Location: gone....

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

Postby clem » 2009-08-06 13:11

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

Postby clem » 2009-08-06 13:13

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.
clem
 
Posts: 4
Joined: 2009-07-11 13:24

Next

Return to Docs, Howtos, Tips & Tricks

Who is online

Users browsing this forum: No registered users and 2 guests

fashionable