Installing with debootstrap

Tweaking a computer is fun, but some people actually use their Debian system to accomplish various tasks. If you are one of those, post your trials and triumphs here.

Installing with debootstrap

Postby dilberts_left_nut » August 6th, 2011, 4:38 am

OK, first the back story...
So I've got my shiny new laptop (well I've had it a couple of months now).
It came with the obligatory Win7, which I kept cos I need to know how to fix it for work.
I originally shrunk the Win partition, dd'd my / and /home partitions from my old lappy's sid/openbox install over to the new machine & updated the fstab & did a grub install & thought it should work.
I'm pretty sure I had it all set up correctly (right UUID's etc) however I couldn't get it to mount the / partition on boot.
I suspect after a lot of googling and trials that it is to do with the old lappy having IDE controller & the new one having SATA.
The old install was done with "only the necessary options for this hardware", which I don't know if it has a bearing or not.
I've tried rebuilding the initramfs from a chroot from the installer (where everything was recognised and working) which as far as I could tell was successful, but still no joy on booting ("waiting for root filesystem").

Anyway I needed it to go "now" so I did a 'temporary' fresh install of squeeze (default with gnome to see if I liked it yet as well) into another partition, which I've been using since.
I've got the urge to fiddle again and want to set up an amd64 install as well, to get access to the rest of my ram and use my 64 bit cpu as intended.
I previously just used the 32 bit installer I already had (you cant just install an amd64 kernel can you?)

I could just boot an installer, but I've done that before and thought I'd try something new.

I've read the debootstrap manpage and read some howto's so now I'm going to charge ahead and see what happens :)

Hmm, ok, so I installed debootstrap, prepared my target partition & mounted it at /mnt/sid
Then did
Code: Select all
# debootstrap --arch amd64 sid /mnt/sid http://ftp.nz.debian.org/debian/

It proceeds to resolve dependencies & download the base system to the target.
Then attempts to chroot into it to be met by
Code: Select all
W: Failure trying to run: chroot /mnt/sid mount -t proc proc /proc
& spits me back to a prompt.
I try manually chrooting ...
Code: Select all
# chroot /mnt/sid /bin/bash
chroot: failed to run command `/bin/bash': Exec format error

Presumably I need to be already running an amd64 system :(

This will be what the
Code: Select all
--foreign
    Do the initial unpack phase of bootstrapping only, for example if the target architecture does not match the host architecture. A copy of debootstrap sufficient for completing the bootstrap process will be installed as /debootstrap/debootstrap in the target filesystem.
is for.

Next question is "if I use this option how do I continue on from there?" reboot into it? ...

OK, looks like I'm buggered, I need to be running an amd64 system to complete the debootstrap second stage, which means I either need an amd64 VM or boot an installer on my hardware anyway ... oh well.

I guess I'll have to "reboot myself ... if I'm not back in 20 mins..." its probably because I've gone to have my dinner or found something else to do ... :P
detly wrote:What's wrong with RTFM as an answer when the answer is clearly in the FM and requires only cursory Ring?
User avatar
dilberts_left_nut
 
Posts: 176
Joined: February 10th, 2011, 8:41 am
Location: enzed

Re: Installing with debootstrap

Postby nadir » August 6th, 2011, 9:16 am

I tried it, for the fun of it, and no, i don't know what i am speaking of. The best i could find is:
http://www.debian-administration.org/articles/356
which tells to add the library path of the chroot to the host
It also tells to link to /lib/ld-linux.so2 from guest to host, but, oh my, that is already in use.
To make it short, i can't get it running with that how-to
(but as i understand it it is possible. No?)

I am quite sure that the subject turns up when using pbuilder and such, but i would not know if it would help for your case.
https://wiki.ubuntu.com/PbuilderHowto
nadir
 
Posts: 1708
Joined: February 9th, 2011, 8:07 am

Re: Installing with debootstrap

Postby dilberts_left_nut » August 6th, 2011, 10:28 am

Cheers for the links.
I gave up & just ran the regular net installer :oops:

I may try it again, without trying to change architectures at the same time, in future, but I'm out of spare partitions and motivation - and I've got a new minimal sid install to set up :D
detly wrote:What's wrong with RTFM as an answer when the answer is clearly in the FM and requires only cursory Ring?
User avatar
dilberts_left_nut
 
Posts: 176
Joined: February 10th, 2011, 8:41 am
Location: enzed

Re: Installing with debootstrap

Postby Beewolf » August 6th, 2011, 11:41 pm

You can't run 64-bit code without a 64-bit kernel(well, you can, but only Apple was ever insane enough to actually do that), which you can find in the 32-bit repos. There are also instructions out there for switching an installed system from i386 to amd64, but they can also break your system(a little less likely with multiarch support coming online, though).
Llewellyn H. Rockwell Jr. wrote:Data points on their own convey no theory, suggest no conclusions, and offer no truths. To arrive at truth requires the most important step that we as human beings can ever take: thinking. Through this thinking, and with good teaching and reading, we can put together a coherent theoretical apparatus that helps us understand.
User avatar
Beewolf
 
Posts: 467
Joined: February 9th, 2011, 4:37 pm

Re: Installing with debootstrap

Postby dilberts_left_nut » August 7th, 2011, 12:57 am

So, I could have installed an amd64 kernel (in my i386 squeeze install) rebooted into it, then carried on with the chroot?
detly wrote:What's wrong with RTFM as an answer when the answer is clearly in the FM and requires only cursory Ring?
User avatar
dilberts_left_nut
 
Posts: 176
Joined: February 10th, 2011, 8:41 am
Location: enzed

Re: Installing with debootstrap

Postby Beewolf » August 7th, 2011, 4:33 pm

More or less.
Llewellyn H. Rockwell Jr. wrote:Data points on their own convey no theory, suggest no conclusions, and offer no truths. To arrive at truth requires the most important step that we as human beings can ever take: thinking. Through this thinking, and with good teaching and reading, we can put together a coherent theoretical apparatus that helps us understand.
User avatar
Beewolf
 
Posts: 467
Joined: February 9th, 2011, 4:37 pm

Re: Installing with debootstrap

Postby polaris96 » August 9th, 2011, 5:57 pm

yeah.

Installing an AMD64 platform from a 32 bit kernel is no problem but you definetly can't chroot to it from the 32bit system. I mean, c'mon, nobody would try to chroot a SPARC architecture from i386, right? Same idea. It's a different architecture despite the fact that amd64s will run the i386 arch.

One thing about debootstrap (I use it lots. I like it for installing the base system). It never seems to install the locales package. To avoid lots of screaming from the kernel, do a
Code: Select all
~#apt-get install locales
on your first boot.

I have a few other tidbits about initializng a debootstrap if you still want to play with it.

Also, check out this link http://wiki.debian.org/EmDebian/CrossDebootstrap Remember they talk about running a separate FLAVOUR not a separate architecture.
for as long as the world remains. for as long as time remains. so, too, will I remain. To serve. To help. And to make my contribution. Also please visit old friends at forums.debian.net
polaris96
 
Posts: 74
Joined: July 29th, 2011, 4:45 pm


Return to Doing stuff with Debian

Who is online

Users browsing this forum: No registered users and 1 guest

cron

x