You are not logged in.

#1 2009-03-19 18:08:20

whoops
Member
Registered: 2009-03-19
Posts: 891

Me "GRUB-ed" something (perhaps ;))

Hi!


Ok, this might have not been the most clever thing to do in the first place considering that I'm not really that much into the whole Archlinux (or "manually setting up my system-") stuff yet...:

So I did boot up my debian (sda), mount a second harddrive (sdb), install some archlinux stuff on it (sdb1 is boot, sdb3 is root) and chroot into it. Then I used pacman to install more base archlinux stuff, gnome and GRUB2 - everything hopefully on sdb. And after that, i configured a lot of stuff - maybe. Or not. Fstab might have been one of the files, and it might maybe be configured correctly if you consider, that i'm planning to permanently switch sda & sdb right before the first "arch boot" after having installed archlinux on sdb(now)/sda(later).

# /etc/fstab: static file system information
#
# <file system>        <dir>         <type>    <options>          <dump> <pass>
/dev/sda1               /boot           ext3            defaults        0       1
/dev/sda3               /               ext3            defaults        0       1
/dev/sda2               swap            swap            defaults        0       0
/dev/sdb1               /debian         ext3            defaults        0       2

none                   /dev/pts      devpts    defaults            0      0
none                   /dev/shm      tmpfs     defaults            0      0

/dev/cdrom             /media/cd   auto    ro,user,noauto,unhide   0      0
/dev/dvd               /media/dvd  auto    ro,user,noauto,unhide   0      0
/dev/fd0               /media/fl   auto    user,noauto             0      0

so then, i did some more stuff i don't remember (mostly "manual-stuff" and "archwiki-stuff" and some "copying-stuff-around-stuff") and after that:

(chroot):/dev# grep -v rootfs /proc/mounts > /etc/mtab
chroot:/dev# grub-install sdb
error: cannot open `/dev/fd0' while attempting to get disk size
error: cannot open `/dev/fd0' while attempting to get disk size
error: cannot open `/dev/fd0' while attempting to get disk size
error: cannot open `/dev/fd0' while attempting to get disk size
error: cannot open `/dev/fd0' while attempting to get disk size
Installation finished. No error reported.
This is the contents of the device map /boot/grub/device.map.
Check if this is correct or not. If any of the lines is incorrect,
fix it and re-run the script `grub-install'.

(fd0)    /dev/fd0
(hd0)    /dev/sda
(hd1)    /dev/sdb

the grub2 cfg looks like this btw...:

# Config file for GRUB2 - The GNU GRand Unified Bootloader
# /boot/grub/grub.cfg

# DEVICE NAME CONVERSIONS
#
#  Linux           Grub
# -------------------------
#  /dev/fd0        (fd0)
#  /dev/sda        (hd0)
#  /dev/sdb2       (hd1,2)
#  /dev/sda3       (hd0,3)
#

# Timeout for menu
set timeout=5

# Set default boot entry as Entry 0
set default=0

# (0) Arch Linux
menuentry "Xarch" {
set root=(hd0,1)
linux /vmlinuz26 root=/dev/sda1 ro
initrd /kernel26.img
}

# (1) Debian
menuentry "Debian GNU/Linux, linux 2.6.26-1-686" {
        set root=(hd1,1)
        search --fs-uuid --set I'VE-GOT-NO-IDEA-IF-I'M-SUPPOSED-TO-BLANK-THIS-VERY-VERY-VERY-VERYLONG-HEXADECIMAL-NUMBER-OUT-BEFORE-POSTING-INSIDE-FORUM$
        linux   /boot/vmlinuz-2.6.26-1-686 root=UUID=I'VE-GOT-NO-IDEA-IF-I'M-SUPPOSED-TO-BLANK-THIS-SHORTER-HEX-NUMBER-OUT-BEFORE-POSTING-INSIDE-FORUM
        initrd  /boot/initrd.img-2.6.26-1-686
}

...so now I have no Idea what i've done and if I will still be able to boot on anything as soon as I restart the PC. Could someone please help me figure that out? I think i already completed most of the installation (maybe - and some customization I need much later, because I stumbled upon how they are done while installing).

I'm not sure if i should just try "grub-install sda" on debian root (without chroot anything), if I should umount sdb first (so maybe IF i installed grub there it isn't removed or something?) or how I get sda(later)/sdb(now) to boot with grub (and let me select debian on sda(now)/sdb(later) if Arch doesn't work yet)... or something.... something. Something maybe wink

(yes, I've spent almost the whole day confusing myself by doing stuff I only marginally understand - or not.)


Thx!



edit: "minor" fstab corrections since first posted applied to post

Last edited by whoops (2009-03-19 18:43:37)

Offline

#2 2009-03-19 18:43:10

slide_rule
Member
From: loglogdecalog
Registered: 2007-09-16
Posts: 33

Re: Me "GRUB-ed" something (perhaps ;))

Hopefully you didn't do this on a machine that absolutely needs to work so you can work/play/live?
The config files *look* ok - but remember that grub2 isn't officially released/supported yet, IIRC, so no guarantees.  And swapping the drives after doing the install is a bit ... unorthodox, esp. if you're new to the idea.

My best recommendation is to make sure you've got a bootable debian or arch CD handy, then go ahead and reboot the machine and see if it works.  If you have issues, post here and we'll see what we can do.

Offline

#3 2009-03-19 19:58:55

Bonzodog
Member
From: Leicester, UK
Registered: 2008-02-14
Posts: 106

Re: Me "GRUB-ed" something (perhaps ;))

/dev/fd0 is floppy drives. Do you have one of these installed on the machine? (not everyone does these days)

If not, you can safely remove that line from the fstab.

If you do, grub is sending a warning that it (obviously) cannot see a disk in the floppy drive, and thus cannot assess its size.

Offline

#4 2009-03-19 20:03:28

perbh
Member
From: Republic of Texas
Registered: 2005-03-04
Posts: 765

Re: Me "GRUB-ed" something (perhaps ;))

the thing is - you can easily have them coincide ... you only need _one_ grub to boot up either of your two distro's -and they can use the same swap-partition too (to boot .. sorry, I couldn't help myself on that one!)
Why don't you just keep your sda and sdb the way they are and then you just add the appropriate entries for archlinux in your debian grub. Obviously - in your arch /etc/fstab you will have to change around sda and sdb again ...
Also - and not everyone agrees with me - but I just h-a-t-e those uuid's - I have absolutely no frigging idea which disk/partition they belong to .. so give me sdaX/sdbX any day!!

Offline

#5 2009-03-19 20:48:46

whoops
Member
Registered: 2009-03-19
Posts: 891

Re: Me "GRUB-ed" something (perhaps ;))

Thanks so far!


Oh, am I  "trying to boot from swap? "that could maybe have gone horribly wrong" (i would be able to guess, if I knew what I was doing)... gotta take a second look... can't find it... (think I accidentally formatted my brain at some point during the installation).

Yes, i've got a floppy and I need it in case everything else fails and i have to go fetch the old shoebox with the old wifi-stick & win98-driver + ndiswrapper on disk (got no LAN here).

I've got no idea what the uiid's means, i just copied them from debian grub hoping they are not specifically associated to the order of the hd's.

The thing about keeping sda/sdb in the order they are is that - In the first place i didn't want to change anything on Debian which I'm not able to undo without Internet browser (=manual & help) but rather just let arch do the job as soon as it works and forget what strange stuff I (maybe) did with the old GRUB. Now I don't know if I already did or if it's still like it was. I'll see... have to reboot at some point.


Hmh... what else? So:
- At the moment, my arch fstab is already in the state it should need to be when sda&b are switched... that's how I did "grub-install sdb" too. Did I mess something up with this? (on current sda and/or b)

So what I'm planning to do as soon as I looked over everything (again) and find the guts...:

- shut down
- switch drives (sda <=> sdb)
- try to boot arch, switch sda & sdb in debian fstab (which should be sdb by then)
- try to boot debian
- if nothing works here: switch drives back, hope that debian still works

... if arch boots:
- copy some .configs from my old debian home to new arch home
- try to startx / gnome (i think i added gnome-session to /etc/xinitr-stuff-something.something)

... if debian works:
- continue messing around on sda (arch) using debian
- make backup of arch stuff that seemed to work ( /etc/... )



I HAVE...:
- Backups of (Debian)/etc & /home on another hd (which is not connected)
- Debian stable lenny install dvd
- a lot of boot and/or live cd's that don't work with my wlan-card and/or video card
- NO LAN, just wpa
- coffee

Does anything I REALLY REALLY REALLY should have or have done before I press "shut down" come to anyone mind? (Sorry if my "writing style" sucks atm, but I really haven't much concentration left [maybe I'll leave the PC running and continue tomorrow]).


thx!

Offline

#6 2009-03-19 21:29:03

slide_rule
Member
From: loglogdecalog
Registered: 2007-09-16
Posts: 33

Re: Me "GRUB-ed" something (perhaps ;))

Good luck!

I know this is a little late - but if the idea was to try out Arch before switching, running an install in a virtual machine is a great way to go, and you don't have to bork your whole system.

Offline

#7 2009-03-19 21:52:27

perbh
Member
From: Republic of Texas
Registered: 2005-03-04
Posts: 765

Re: Me "GRUB-ed" something (perhaps ;))

The uuids are unique for each disk and partition _and_ filesystem on that partition!!
Stick to /dev/sdaX - at least then you just _know_ what you are referring to.

<edit>
Actually, I didn't know about the latter, but seemingly if you put another filesystem on a given partition, its uuid will change.
Me - I stay as far away from uuid as possible!
</edit>

Last edited by perbh (2009-03-19 21:55:09)

Offline

#8 2009-03-19 22:01:25

slide_rule
Member
From: loglogdecalog
Registered: 2007-09-16
Posts: 33

Re: Me "GRUB-ed" something (perhaps ;))

[a little bit OT]

perbh wrote:

The uuids are unique for each disk and partition _and_ filesystem on that partition!!
Stick to /dev/sdaX - at least then you just _know_ what you are referring to.

Actually, that's the problem that UUIDs are meant to fix.  SATA drives can sometimes get reordered, like if you add in another drive, or the kernel updates.  If you use UUIDs, you know that you're always mounting the same filesystem in the same place.

::shrug:: I'm not going to argue strongly for them, but that's what they're for.

[edit]
Here's a wiki article on Persistent block device naming.
[/edit]

Last edited by slide_rule (2009-03-19 22:04:29)

Offline

#9 2009-03-19 22:01:46

perbh
Member
From: Republic of Texas
Registered: 2005-03-04
Posts: 765

Re: Me "GRUB-ed" something (perhaps ;))

Maybe I'm stupid - but I am also extremely unhappy about chroot.
In your case - you booted from debian and then chroot'ed to arch?!
Well - your kernel is still debian and 1000-to-1 it is _not_ the same kernel as used by arch.
So you are using a debian kernel with arch utilities?

How you managed to do what you allready (seem to) have done without mishaps is beyond me.

Offline

#10 2009-03-19 22:43:33

whoops
Member
Registered: 2009-03-19
Posts: 891

Re: Me "GRUB-ed" something (perhaps ;))

Most of what I did so far is beyond me, too - I read about "chroot" in some gentoo installation manual yesterday and then when I stumbled upon "pacman.static", i spontaneously decided to install arch instead. Is there something I've got to get again with pacman or something like that after I booted arch? Already installed most of the stuff inside my chroot while browsing trough the wiki pages...

So now, i did the first boot with the new hd order. After trying to load the kernel from the swap partition a few times i changed a 3 to a 2 and finally to a 1 after pressing "e" somewhere and arch booted fine. I have been able to start gdm which would possibly have provided me with a very easy way to get everything else (like wpa) running if i had any fonts installed - seems like I forgot the whole xorg-group and only the basic things gdm etc. have dependencies on were installed.

So, as wlan is not yet working with arch i'm back to debian (which runs fine on sdb after I trashed the old grub entry for it that somehow contained a lot of errors) and used astuff (rch to change the debian fstab. Now , i'm inside chroot again and have just installed the complete xorg stuff - hope that's really what made my X-"keyboard not work and text doesnt show". Anything else I might have forgotten if not xorg?

Trying another reboot soon... first I'm looking trough "stuff" if there's something that looks like a kernel-specific program or something... i don't have virtualbox-ose installed (yet), as i already had a lot of issues with that thing and "messing around with my kernel"... can't seem to find anything else. Perhaps it's not very likely to find something if I can't do much more than look for a "-686-26" attached to something somewhere...

Offline

#11 2009-03-20 00:31:25

slide_rule
Member
From: loglogdecalog
Registered: 2007-09-16
Posts: 33

Re: Me "GRUB-ed" something (perhaps ;))

This may come out sound a little harsh, but it's not meant that way.

You're using too many words like "somewhere" and "somehow" and "I hope that."  I would really suggest you switch back to a setup that you understand and can use, and then start again, but SLOW DOWN and pay WAY more attention to what you're doing while you're doing it.  I'm sorry, but sentences like "i changed a 3 to a 2 and finally to a 1 after pressing "e" somewhere and arch booted fine" terrify me.   You pressed "e" on the grub screen and edited the command line, but that's not something to do randomly.  Installing Arch isn't just a matter of pushing buttons and editing configs until things work right, it's really important that you know what you're doing before you do it.  You said yourself that you're not "into the whole manually setting up my system thing," and I think you need to take a deep breath, start over and slow down.

If you want to try arch out, try a virtual box (or equivalent) install first - go through the install step by step, and *don't do ANYTHING until you understand what it is you're doing.*  Like perbh said, it's a little surprising things have gone as well as they have.

Offline

#12 2009-03-20 00:54:19

jamesbannon
Member
From: Paisley, Scotland
Registered: 2008-10-24
Posts: 50

Re: Me "GRUB-ed" something (perhaps ;))

The "errors" from grub on fd0 you can safely ignore - they just mean there's no disk in the drive. Since it's set to noauto anyway, it's irrelevant for booting. You can comment it out and HAL will pick it up automatically on starting X (same with the DVD etc).

The "big long hexadecimal number" is your disk "UUID" (unique identifier) which should be the default. There should be a file called blkid.tab in /etc (it is refreshed each time on boot). It's contents should look something like this:

<device DEVNO="0x0801" TIME="1237499636" UUID="3f8b6294-845e-47e5-bd5a-3a6d8ea96cf1" TYPE="ext2">/dev/sda1</device>
<device DEVNO="0x0802" TIME="1237481665" UUID="2d846686-ef78-4f28-a3bd-8d39deb1478e" TYPE="swap">/dev/sda2</device>
<device DEVNO="0x0803" TIME="1237499636" UUID="99a08254-4a86-4968-9758-7cff44d2b0e3" SEC_TYPE="ext2" TYPE="ext3">/dev/sda3</device>
<device DEVNO="0x0811" TIME="1237481665" UUID="2BCB-68F9" TYPE="vfat">/dev/sdb1</device>
<device DEVNO="0x0821" TIME="1237499636" UUID="312053f9-db95-4c2b-9d83-3203f3e4c209" SEC_TYPE="ext2" TYPE="ext3">/dev/sdc1</device>

The UUID-device mappings will be different on your machine of course. I'm a bit surprised grub didn't pick them up automatically, but you can copy from menu entry 1 if needed.

Other people have picked up on what you did wrong with the chroot. When you do that, you are using the old kernel, not the freshly installed one. You can install some utilities in this state, but anything that touches the kernel, such as adding a wlan device driver, installing fuse, firewall, etc, won't work. Myself, I usually just tidy up under chroot, editing some files and making sure all the settings I chose when setting up off the boot disk are OK.

Oh, and finally, before trying a different distro backup your data first. Then do some research. Arch isn't that difficult to install if you follow the instructions closely and read the config files carefully. There are some things that are a sod to set-up no matter what the distro (wireless being one), but on the whole, it's relatively painless.

Offline

#13 2009-03-20 01:25:08

whoops
Member
Registered: 2009-03-19
Posts: 891

Re: Me "GRUB-ed" something (perhaps ;))

Hi!

slide_rule wrote:

This may come out sound a little harsh, but it's not meant that way.

No worries, I get to hear that a lot tending to jump into those things like that. I'm surprised too, that this time so many steps just worked out (usually I need 3-10 tries to do something THAT new). Somehow, usind the wiki and trying a lot of "stuff", i'm now done with almost no "losses". Perhaps it's just a very transparent distro if you "stumble around in its guts" i guess...

jamesbannon wrote:

you can install some utilities in this state, but anything that touches the kernel, such as adding a wlan device driver, installing fuse, firewall, etc, won't work.

That's strange - i definitly installed the wlan driver while in chroot (did need wlan to do so wink) - and now with arch/gnome-network-manager it works perfectly. Perhaps I was lucky I chose the "kernel that looks newer because it's not default and has a bigger number" when I installed Debian (uhm... 686-26.-626... don't know, but there were a lot of 6's and 2's in it) some months ago.

My Arch/Debian - Setup is complete so far. I've got "my gnome" back with compiz as wm. It's running smoother as debian xfce did - I'm really surprised how fast everything is ans copying the home-folders my most used applications use from debian to arch to get all settings & data back worked fine too.

So that should be it for now, the rest will hopefully reveal itsself while working with Arch & customizing it further.



thx

Offline

#14 2009-03-20 02:10:04

perbh
Member
From: Republic of Texas
Registered: 2005-03-04
Posts: 765

Re: Me "GRUB-ed" something (perhaps ;))

*chuckles*
_me_ - I like your style of writing (sorry 'slide_rule'). That's what made me want to help out in the first place.
Maybe it's got to do with "a man never asks for directions" ... it was just refreshing!
Glad you've got it all up and going (in-spite of everything).

I think that us old-timers sometimes could do with a brand new install from scratch. Personally I haven't done anything but updating for about 2 years now - on several computers, but I have usually been able to make an image (read tar-file) of one I'm perfectly happy with and which is sufficiently similar that I can just clone it ...
And then I update 2-3 times a week *lol*

I hope i didn't waylay you with the 'to boot' - that is just an expression ... ;-)
Keep it up!

Offline

Board footer

Powered by FluxBB