# no needed folders in /boot argh

## BloodyNewbie

Hello

Sorry to ask such a noobquestion, but really, I am desperate and didn't find the problem here with the search function!

-->

I made everything after plan:

```
emerge development-sources

ln -s /usr/src/linux-2.6.7 /usr/src/linux

cd /usr/src/linux

make menuconfig

<--did some naughty stuff in there -->

make && make modules_install

```

Here the problem starts: I can't copy the stuff to /boot because /boot is empty!! but:

I did activate the button in the menuconfig 

"[*]   Automatically mount at boot"

and I did also

```
mount /dev/hda1 /boot
```

anyone could help me?

thanx a lot

greets

patrick

----------

## mike4148

"Automatically mount at boot" automatically mounts devfs at boot. It has nothing to do with /boot.

Did you follow step 9 of the install guide? That fills /boot with the bootloader files (everything but your kernel image). If you're not sure whether /boot is mounted or not, type

```
mount
```

at a prompt to see every filesystem that's booted. If you're in the middle of an install, make sure you do this inside the chroot environment.

----------

## BloodyNewbie

...

```

# mount

/dev/ROOT on / type xfs (rw,noatime)

/dev/hda1 on /boot type ext2 (rw)

```

.. I'm not quite sure about the ROOT Partition, it should be of type reiserfs and not xfs..(excuse me, if that's the same...

PS: Nothing is marked as [m] (no modules!) in the kernelconfig..

----------

## megadonkey

 *BloodyNewbie wrote:*   

> ...
> 
> ```
> 
> # mount
> ...

 

You need to change fstab.

```
nano -w /etc/fstab
```

and change /dev/ROOT to wherever you have your root-partition.

Something like /dev/hda3. If hda3 is your root that is.

----------

## BloodyNewbie

right, fstab was totally messed up!!!

Well I corrected the stuff but the "mount" gives still

```
/dev/ROOT on / type xfs (rw,noatime)...
```

do I have to UNchroot or something to re-mount the root(/) onto dev/hda3 ?

my fstab looks as following:

```

/dev/hda1      /boot      ext2      noatime      1 2

/dev/hda2      none      swap      sw         0 0

/dev/hda3      /      reiserfs   noatime         0 1

/dev/hda4      /home      reiserfs   noatime         0 1

/dev/cdroms/cdrom0   /mnt/cdrom   auto      noauto user      0 0

none         /proc      proc      defaults      0 0

none         /dev/shm   tmpfs      defaults      0 0

```

.. I see no other way than to UPchroot or however that is told  :Smile: 

how do I manage that?

btw: why did the fstab get so damn messed up??

----------

## mike4148

First, make sure you are editing the chroot fstab (that is, /mnt/gentoo/etc/fstab outside the chroot). If you're not, fix the chroot one.

Next, totally exit the chroot, unmount /mnt/gentoo/boot, /mnt/gentoo/proc, and /mnt/gentoo. Then, remount all three with the right commands. For you, those would be

```
mount /dev/hda3 /mnt/gentoo

mount -t proc none /mnt/gentoo/proc

mount /dev/hda1 /mnt/gentoo/boot
```

Finally, reenter the chroot as usual,

```
chroot /mnt/gentoo /bin/bash
```

Hopefully, all of the above will work; if anything fails, return here with the messages. If it all goes OK, copy your kernel to /boot and follow the Bootloader Configuration section of the install guide to put the other necessary files there. At that point, /boot should be completely done, leaving you to finish the rest of the install.

----------

## BloodyNewbie

I still get the message:

```

#mount

/dev/ROOT on / type xfs (rw,noatime) 

/dev/hda1 on /boot type ext2 (rw)

```

daaaaaaarn

Could you explain me this one now? -->

back to liveCD:

```

livecd gentoo#mount

tmpfs on / type tmpfs (rw)

none on /dev type devfs (rw)

/newroot/dev/cdroms/cdrom0 on /mnt/cdrom type iso9660(ro)

none on /proc type proc (rw)

none on /proc/bus/usb type usbfs (rw)

/dev/hda3 on /mnt/gentoo type reiserfs(rw)

livecd gentoo#umount /mnt/gentoo

umount: /mnt/gentoo:device is busy

umount: /mnt/gentoo:device is busy

```

help *g

----------

## megadonkey

Not sure if this matters but after you umm re-chrooted did you do a:

```
env-update

source /etc/profile
```

----------

## BloodyNewbie

yes, I did

gosh, now it really gets ugly:

back at gentooROOT

```

#env-update

Traceball (most recent call last):

File "/usr/sbin/env-update",line 11, in ? portage.env_update()

File "/usr/lib/portage/pym/portage.py", line 734, in env_update outfile=open(root+"/etc/profile.env","w")

IOError: [Errno 30] Read-only file system: '//etc/profile.env'

```

tell me something: wouldn't it be save to shutdown and reboot? I mean I can't lose the files, can I?

But this error above comes from chrooting to /mnt/gentoo  while that was a "busy device" I think that was not good to chroot there... *g

but why is it busy? there are no "sub"mounts in the inner of /mnt/gentoo...

----------

## megadonkey

I think it's safe to reboot and mount the partitions and do the chroot stuff again. Then continue from where you are now.

I don't think you will lose any files

Hopefully...

 :Wink: 

----------

## BloodyNewbie

yeah, works, but that DORK is still here!!

```
#mount

/dev/ROOT on / type xfs (rw,noatime)

```

what the hell does he want from me? aaahh *goingbonkers*

----------

## BloodyNewbie

Shall I roll back another step and mke2fs my boot partition?

but actually I don't think it has something to do with the boot parti...

the problem is imho (well first of all, I am the problem *g and when we dig a bit deeper:) fstab of the gentoo chroot isn't strong enough to set his /dev/hda1 against the /dev/ROOT that came from the liveCD(i think), so ROOT is the winner, and gets the "/" as a trophy and makes silly stuff with it, as giving it the x file system ...

how can we help poor little hda1?

----------

## megadonkey

When you say:

 *Quote:*   

> Here the problem starts: I can't copy the stuff to /boot because /boot is empty

  I'm not really sure what you mean?

Is it still empty when you copied bzImage there or what?

Because /boot is empty until you copy the kernel there or until you've installed a bootloader.

----------

## BloodyNewbie

ok, i think, as in the manual stands:

Code Listing 38: Installieren des Kernels

(Für x86-basierende Systeme)

```

# cp arch/i386/boot/bzImage /boot/kernel-2.4.24

# cp System.map /boot/System.map-2.4.24

```

does NOT imply

```
mkdir /boot/kernel-2.4.24

mkdir /boot/System.map-2.4.24
```

does it?

'Cause IF it does, why is the mkdir in other steps of the installation always written?...

----------

## megadonkey

No you shouldn't have to mkdir before you copy stuff to /boot

But are you sure you didn't miss a step earlier in the installation?

Such as:

```
# mount /dev/hda3 /mnt/gentoo

# mkdir /mnt/gentoo/boot

# mount /dev/hda1 /mnt/gentoo/boot
```

The mkdir /mnt/gentoo/boot part I mean?

----------

## BloodyNewbie

No, I definitely made that step...

I have a folder there, called /boot respectively /mnt/gentoo/boot

At least I know now, that my gentoo stole the fstab settings from the LiveCD...how great  :Smile: 

well but that doesn't help a lot  :Wink: 

----------

## megadonkey

When you do:

```
# cp arch/i386/boot/bzImage /boot/kernel-2.4.24

# cp System.map /boot/System.map-2.4.24 
```

Don't you get a file in /boot called kernel-2.4.24?

```
# cp arch/i386/boot/bzImage /boot/kernel-2.4.24 
```

That command means copy bzImage to /boot and rename it to kernel-2.4.24

Not that you should have a dir called kernel-2.4.24 if that was what you thought. 

(or maybe I'm just tired and bloody useless, probably both   :Very Happy:  )

----------

## BloodyNewbie

hehe, wait, I tought, the folder was empty, but my eyes play tricks with me sometimes..let's see...uuuh kernel-2.4.24 ...

hmm, perhaps I should wear some glasses  :Very Happy: 

no mate, it's definitely empty AND it's definitely mounted on /dev/hda1 what is my boot partition with the e2 file system.

But nice try *g

----------

## BloodyNewbie

not useless, you calm me down, that's worth very much  :Smile: 

----------

## megadonkey

Umm. Well, I'm really not sure what's wrong but:

 *Quote:*   

> I have a folder there, called /boot respectively /mnt/gentoo/boot

 

I wonder if something actually went wrong when you chrooted.

Inside the chroot shouldn't there just be /boot?

It's been a while since I installed gentoo so I don't remember that much...

if you do a:

```
ls /boot
```

and a:

```
ls /mnt/gentoo/boot
```

does it show anything?

----------

## BloodyNewbie

perhaps asked in another way:

what is the KEY EFFECT, that creates in /boot the folders kernel-xy and System.map-xy ???

that is the key question...[/b][/code]

----------

## megadonkey

 *BloodyNewbie wrote:*   

> perhaps asked in another way:
> 
> what is the KEY EFFECT, that creates in /boot the folders kernel-xy and System.map-xy ???
> 
> that is the key question...[/b][/code]

 

No, they're not folders. they're files.

# cp arch/i386/boot/bzImage /boot/kernel-2.4.24

That command means copy bzImage to /boot and rename it to kernel-2.4.24

----------

## BloodyNewbie

look, it's very simple in fact:

I mount my /dev/hda3 to /mnt/gentoo

and with that the folders come there! that means /mnt/gentoo/boot or /mnt/gentoo/proc or /mnt/gentoo/etc and so on.

That is, because they are on the dev hda3!

And i don't have to remake them(I even CANNOT) because they already exist, but this naturally only if I mounted /dev/hda3 on /mnt/gentoo

after that comes:

mounting /dev/hda1 to /mnt/gentoo/boot

mounting /dev/hda4 to /mnt/gentoo/home

mounting -t proc none /mnt/gentoo/proc

and then i chroot to /mnt/gentoo (this is all seen from liveCD foldertree!!

then simsalabim and I am in there

now the /boot is the same as it was before /mnt/gentoo/boot

STILL nothing inside  :Smile: 

I can now REmount /boot but that makes no sense it IS already mounted because I mounted it before chrooting into /mnt/gentoo...

hm, maybe that could be a problem..

perhaps I shouldn't have mounted /boot and /home already before chrooting into /

...

let's give it a try  :Smile: 

----------

## BloodyNewbie

ah yes sorry, my mistake...but anyhow the question still stays there. How can the /boot know, that there will be something coming and having exactly that name! namely: kernel-xy and System.map-xy ...

and from where comes that knowledge...

does anybody know?

----------

## BloodyNewbie

damn, I have the hard knocking feeling, that I have to reset my hda3, 'cause I think, somehow, the liveCD has got hda3 linked to /dev/ROOT and with that controls it...

ah this is science fiction, isn't there anybody with some real facts?  :Smile: 

----------

## BloodyNewbie

The only advantage I have is: NoOne ever said, that this would be wrong that there stands /dev/ROOT with xfs ... !

so maybe it is ok,but the question with the bootfolder remains unanswered

----------

## megadonkey

Editing /etc/fstab comes after the kernel stuff.

After you compiled the kernel you should just copy it to /boot

```
cp /usr/src/linux/arch/i386/boot/bzImage /boot/kernel-2.6.7
```

Then copy the System.map:

```
cp /usr/src/linux/System.map /boot/System.map-2.6.7
```

With those commands you should have 2 files not dirs in /boot called kernel-2.6.7 and System.map-2.6.7.

----------

## BloodyNewbie

yeah, I MUST be the dumbest guy on earth  :Smile: 

really stucked with the term "directories"

because the logical thinking of mine was: if these are dir's I first have to create them, till I can copy something in it..(because otherwise it says: folder doesn't exist)

omg...

can we delete this thread? seriously

----------

## megadonkey

 :Laughing: 

I was starting to think that you had mounted your /boot in a black hole.

 :Razz: 

Ah well.

Good luck with the rest of the install.

----------

## BloodyNewbie

hehe thx a lot for your help  :Smile: 

----------

## neysx

Damn!  walked into this thread!

 *BloodyNewbie wrote:*   

> look, it's very simple in fact:

 Actually, it is.

 *BloodyNewbie wrote:*   

> I mount my /dev/hda3 to /mnt/gentoo
> 
> and with that the folders come there! that means /mnt/gentoo/boot or /mnt/gentoo/proc or /mnt/gentoo/etc and so on.
> 
> That is, because they are on the dev hda3!
> ...

 That is simply because you copied your kernel image under the boot directory (note that I wouldn't know what a folder is, is that what MS calls a directory?) on your root partition. You hadn't mounted /dev/hda1 on /mnt/gentoo/boot.

A mount point is just like any ordinary directory. If you copy stuff into it before it is mounted, it stays in the partition that hosts the mount point, then you mount your partition and what was in the directory is not accessible anymore. Plain and simple.

Just mount your partitions like you described above and copy your kernel in it.

In other words, you copied files under /dev/hda3/boot instead of /dev/hda1/

 *BloodyNewbie wrote:*   

> I can now REmount /boot but that makes no sense it IS already mounted because I mounted it before chrooting into /mnt/gentoo...
> 
> hm, maybe that could be a problem..
> 
> perhaps I shouldn't have mounted /boot and /home already before chrooting into /
> ...

 

The sequence you described above is correct, it is just not what you did the first time, or you did not notice an error message

 *BloodyNewbie wrote:*   

> ah yes sorry, my mistake...but anyhow the question still stays there. How can the /boot know, that there will be something coming and having exactly that name! namely: kernel-xy and System.map-xy ...
> 
> and from where comes that knowledge... 

 That knowledge comes from you. You might as well name your kernel tototutu123 as long as you use the same name when you configure your bootloader.

 *BloodyNewbie wrote:*   

> The only advantage I have is: NoOne ever said, that this would be wrong that there stands /dev/ROOT with xfs ... !
> 
> so maybe it is ok,but the question with the bootfolder remains unanswered

 The handbook does tell you how to edit your /etc/fstab (here) and gives you a basic sample that is consistent with the partitioning scheme that is use in the handbook.  The /dev/ROOT will not go away until you fix it and your system will not boot properly until it is fixed.

hth

----------

## BloodyNewbie

No

everything worked fine afterwards. I know what I did wrong and it hasn't anything to do with /dev/ROOT on / with xfs. I am now pretty much convinced, that this was correct, even if it looks crappy... my personal opinion also is: try it on your own from the LiveCD 2004.1, perhaps I am right

Look, this was a PLAIN NEW SYSTEM, i installed it after formatting everything, that means: the /boot was ANYWAY empty! and I knew that, I just thought, that make & make modules_install would create me some kind of a covering, or a hull... you know, a 0Byte file or folder in the mounted /boot so I would know how the files were named to copy arch/.. and System.map to there.

Well I won't do that fault again  :Smile: 

and that for shure: I KNEW when I had what mounted, it was a bit crappy when I did all that sensless chrooting, cause always had to merge and umerge filesystems.

But now, even at the first time, I tried to copy to /boot IT WAS cleanly mounted, I just didn't realise, that I wasn't looking for a folder in there(see above), so all the "TAB"ing when beginning to write /boot/kernel.. (what normally finishes the word, if the folder exists). And I held that for a fault...

The problem really WAS that simple, as megadonkey said:

The files don't exist on /dev/hda3 till I copy them there...

But thanks for your conclusio anyway hehe  :Smile: 

----------

