Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

new install won't load, no bootloader?

Ask for help with issues regarding the Installations of the Debian O/S.
Post Reply
Message
Author
Michael
Posts: 8
Joined: 2014-03-20 22:40

new install won't load, no bootloader?

#1 Post by Michael »

Hello All:

I installed Debian onto a new harddrive in an NAS. Everything seemed to run successful, but upon restart it fails and doesn't go anywhere. I can connect to the NAS via busybox and from the Debian installer there can go into a shell.

During install it created four partitions (/boot / swap /home). I can see them with "blkid" and in /dev/disk/by-id.

I can mount the boot drive via
mount -t ext2 /dev/sda1 /mnt
and in /mnt I see boot and vmlinuz ...

I am assuming this is something simple to fix, but I don't know how to go about it. If busybox is the first piece loaded on such a device, would I have to tell it where to load Debian from? Or is this something I now fix on the mounted boot partition. Anything to check that the Debian install did go all successful?

Thanks for any pointers to help me poke at this further.

Mike


kernal-image-3.2.0.4-orion5x-di on an arm processor.

User avatar
kiyop
Posts: 3983
Joined: 2011-05-05 15:16
Location: Where persons without desire to improve themselves fear to tread, in Japan
Been thanked: 3 times

Re: new install won't load, no bootloader?

#2 Post by kiyop »

What boot (kernel) loader was installed?
Post the content of the configuration (boot menu entry) for the installed debian.
For example, for Grub2, /boot/grub/grub.cfg from
menuentry
to
}
Openbox, JWM: Jessie, Sid, Arch / Win XP (on VirtualBox), 10
http://kiyoandkei.bbs.fc2.com/

Michael
Posts: 8
Joined: 2014-03-20 22:40

Re: new install won't load, no bootloader?

#3 Post by Michael »

That's what got me stumped a little (inexperience etc).

If I look at /mnt
I get a link
boot -> .

but in that directory there isn't much besides System.map boot, config initrd.img lost+found uImage and vmlinuz


On busybox /boot doesn't exist. On /etc there is no LILO or grub. But this busybox image might not exist except to run the installer. So where else do I look for the bootloader?

User avatar
kiyop
Posts: 3983
Joined: 2011-05-05 15:16
Location: Where persons without desire to improve themselves fear to tread, in Japan
Been thanked: 3 times

Re: new install won't load, no bootloader?

#4 Post by kiyop »

How did you install the debian? Write concretely. For example, the concrete URL where you downloaded the image you used to install the debian, the concrete way you installed the debian.

Write the contents of /etc/fstab in /dev/sda1.

You may be able to chroot to /dev/sda1 (mounted at /mnt) and install many things in chroot jail.

ADDED at Fri Mar 21 08:33:53 JST 2014:

I removed the lines relevant to my misunderstanding.
You should mount /boot partitions and so on properly before chroot.
Last edited by kiyop on 2014-03-20 23:35, edited 1 time in total.
Openbox, JWM: Jessie, Sid, Arch / Win XP (on VirtualBox), 10
http://kiyoandkei.bbs.fc2.com/

User avatar
kiyop
Posts: 3983
Joined: 2011-05-05 15:16
Location: Where persons without desire to improve themselves fear to tread, in Japan
Been thanked: 3 times

Re: new install won't load, no bootloader?

#5 Post by kiyop »

Michael wrote:During install it created four partitions (/boot / swap /home).
I misread the above line.
Maybe /dev/sda1 is / and the contents of /boot directory is in another partition.
Post the contents of /etc/fstab in /dev/sda1.
Openbox, JWM: Jessie, Sid, Arch / Win XP (on VirtualBox), 10
http://kiyoandkei.bbs.fc2.com/

Michael
Posts: 8
Joined: 2014-03-20 22:40

Re: new install won't load, no bootloader?

#6 Post by Michael »

Sorry, please let me know if this is not an appropriate thread here.

This is on a headless NAS, that I need to put into recovery mode, upon which I can install a bootimage from a linux netbook. I can then ssh into the NAS and run the Debian installer.

The debian installer came from here:
http://ftp.nl.debian.org/debian/dists/s ... etboot.img

During installation there was no screen for Grub. It may be that this one is running a different boot loader (u-boot?), since is ARM based.

As far as /etc/fstab, that would be coming from the busybox boot image, right, so it looks like this.
none /dev/pts devpts defaults 0 0
none /run tmpfs nosuid,size=10%,node=755 0 0
none /proc proc defaults 0 0
none /sys sysfs noauto 0 0

Would I have to boot directory in /mnt somehow?

Two other things:
1) I installed Debian successfully the same way on that same device on a much smaller harddrive, 2 days ago.
2) everything seemed to go successful. is there a way for me to tell whether it actually was a successful installation, or if I'm better off running through the multi-hour install again. I was hoping that I'm missing a file or an entry some place to steer this "correct looking" system to health without trying the redo.

Sorry, just don't know enough about the boot sequence to tell that something may not have happened correctly.

Thanks for all your help,
Mike

User avatar
kiyop
Posts: 3983
Joined: 2011-05-05 15:16
Location: Where persons without desire to improve themselves fear to tread, in Japan
Been thanked: 3 times

Re: new install won't load, no bootloader?

#7 Post by kiyop »

Thank you for posting the above :)
Excuse my bothering. Now I realize that I am not familiar with your problem :oops:
I wonder if you posted /etc/fstab in busybox. If so, please post /etc/fstab in /dev/sda1 (=/mnt/etc/fstab after you mount /dev/sda1 onto /mnt). Otherwise, retry installation without separating /boot partition.

And post the result of

Code: Select all

fdisk -l
blkid
Openbox, JWM: Jessie, Sid, Arch / Win XP (on VirtualBox), 10
http://kiyoandkei.bbs.fc2.com/

Michael
Posts: 8
Joined: 2014-03-20 22:40

Re: new install won't load, no bootloader?

#8 Post by Michael »

There is no /etc/fstab in the boot partition (in /mnt).

I did post the /etc/fstab from the busybox image


fdisk isn't a command I can run from busybox
blkid shows
/dev/sda1: UUID= ... TYPE="ext2"
/dev/sda2: UUID=... TYPE="ext4"
/dev/sda3: UUID=... TYPE="swap"
/dev/sda4: UUID=... TYPE="ext4"

These four should correspond to
/boot
/
swap
/home

Does that help?

User avatar
kiyop
Posts: 3983
Joined: 2011-05-05 15:16
Location: Where persons without desire to improve themselves fear to tread, in Japan
Been thanked: 3 times

Re: new install won't load, no bootloader?

#9 Post by kiyop »

I see. Execute the following and post the result as far as possible

Code: Select all

mount -t ext4 /dev/sda2 /mnt -o rw
cat /mnt/etc/fstab
cat /mnt/etc/apt/sources.list
mount -t ext2 /dev/sda1 /mnt/boot -o rw
mount -t ext4 /dev/sda4 /mnt/home -o rw
mount -t proc proc /mnt/proc
mount --bind /dev /mnt/dev
mount --bind /dev/pts /mnt/dev/pts
mount --bind /sys /mnt/sys
chroot /mnt /bin/bash
fdisk -l
apt-get update -q
dpkg -l | grep linux-image
dpkg -l | grep grub
exit
umount -l /mnt/dev/pts /mnt/sys /mnt/proc /mnt/home /mnt/boot
umount -l /mnt/dev
umount -l /mnt
Openbox, JWM: Jessie, Sid, Arch / Win XP (on VirtualBox), 10
http://kiyoandkei.bbs.fc2.com/

Michael
Posts: 8
Joined: 2014-03-20 22:40

Re: new install won't load, no bootloader?

#10 Post by Michael »

~ # mount -t ext4 /dev/sda2 /mnt -o rw
mount: mounting /dev/sda2 on /mnt failed: No such device

I think that keeps the rest of the commands from not working.
Same for sda4. I can only mount /dev/sda1

-----

mount -t ext4 /dev/sda2 /mnt -o rw
cat /mnt/etc/fstab
cat /mnt/etc/apt/sources.list
mount -t ext2 /dev/sda1 /mnt/boot -o rw
mount -t ext4 /dev/sda4 /mnt/home -o rw
mount -t proc proc /mnt/proc
mount --bind /dev /mnt/dev
mount --bind /dev/pts /mnt/dev/pts
mount --bind /sys /mnt/sys
chroot /mnt /bin/bash
fdisk -l
apt-get update -q
dpkg -l | grep linux-image
dpkg -l | grep grub
exit
umount -l /mnt/dev/pts /mnt/sys /mnt/proc /mnt/home /mnt/boot
umount -l /mnt/dev
umount -l /mnt

User avatar
kiyop
Posts: 3983
Joined: 2011-05-05 15:16
Location: Where persons without desire to improve themselves fear to tread, in Japan
Been thanked: 3 times

Re: new install won't load, no bootloader?

#11 Post by kiyop »

Michael wrote:~ # mount -t ext4 /dev/sda2 /mnt -o rw
mount: mounting /dev/sda2 on /mnt failed: No such device
To solve the above problem, I want to know the reason.
Is /dev/sda2 encrypted or under LVM?
I wonder if busybox lacks the necessary module to mount (recognize) ext4.
How about executing

Code: Select all

modprobe ext4
Can you boot debian installer and enter into tty2 or so by pressing CTRL+ALT+F2?
I hope that your busybox and/or debian installer contains the proper module for mounting ext4.

You mentioned
Michael wrote:fdisk isn't a command I can run from busybox
blkid shows
/dev/sda1: UUID= ... TYPE="ext2"
/dev/sda2: UUID=... TYPE="ext4"
/dev/sda3: UUID=... TYPE="swap"
/dev/sda4: UUID=... TYPE="ext4"

These four should correspond to
/boot
/
swap
/home
/dev/sda2 is recognized by blkid. But it cannot be mounted. Weird.
Openbox, JWM: Jessie, Sid, Arch / Win XP (on VirtualBox), 10
http://kiyoandkei.bbs.fc2.com/

Michael
Posts: 8
Joined: 2014-03-20 22:40

Re: new install won't load, no bootloader?

#12 Post by Michael »

Oooh ...

lsmod

shows ext2 and ext3, but not ext4

modprobe ext4

gives
libmod: kmod_lookup_alias_from_builtin_file: could not open builtin file '/lib/modules/3.2.0.4-orion5x/modules.builtin.bin'
FATAL: Module ext4 not found


If I ssh into the NAS to run the installer and then hit CTRL-ALT-F2 it opens a tty on the linux netbook.

So is the above the explanation: Don't let the installer partition your drive with ext4, since busybox does not have support for it,
and so won't be able to mount them properly?

If that's the case, perhaps I can have busybox repartition those two to ext3 format and be set.
The /boot partition at ext2 should be fine ...

Anything else to look at?

User avatar
kiyop
Posts: 3983
Joined: 2011-05-05 15:16
Location: Where persons without desire to improve themselves fear to tread, in Japan
Been thanked: 3 times

Re: new install won't load, no bootloader?

#13 Post by kiyop »

I suggest you fformatting to and/or generating ext3 or ext2 partitions.
Otherwise, you can include ext4 module to your busybox. I wonder if your busybox is booted with kernel and initramfs file. You can include ext4 module to initramfs and generate a new initramfs file.
Openbox, JWM: Jessie, Sid, Arch / Win XP (on VirtualBox), 10
http://kiyoandkei.bbs.fc2.com/

Michael
Posts: 8
Joined: 2014-03-20 22:40

Re: new install won't load, no bootloader?

#14 Post by Michael »

Kiyop:

Thank you for all your help. I'm not going to deal with modifying busybox, particularly since it seems to be a downloaded RAM image that is somewhat limited in what it can do. During the Debian install, you can see it download the ext4 module, but I'm guessing that's for Debian later one. Also looks like ext4 will be better for larger disks, so I'll deal with that once Debian is booting on the NAS, but for now I'll do a manual partition to force it to be ext3.

Thanks again. I'm glad you were able to have me poke around till we found something nonintuitive yet obvious.

Arigato gozaimasu.

User avatar
kiyop
Posts: 3983
Joined: 2011-05-05 15:16
Location: Where persons without desire to improve themselves fear to tread, in Japan
Been thanked: 3 times

Re: new install won't load, no bootloader?

#15 Post by kiyop »

You are welcome :)
I am interested in your problem. I have never installed debian on arm.
I found http://ftp.nl.debian.org/debian/dists/s ... etboot.img uses u-boot.

Code: Select all

# file netboot.img 
netboot.img: u-boot legacy uImage, Debian kernel, Linux/ARM, OS Kernel Image (Not compressed), 1481320 bytes, Wed Feb  5 01:21:16 2014, Load Address: 0x01000000, Entry Point: 0x01000000, Header CRC: 0x46DDAE84, Data CRC: 0x24338EE4
Openbox, JWM: Jessie, Sid, Arch / Win XP (on VirtualBox), 10
http://kiyoandkei.bbs.fc2.com/

Michael
Posts: 8
Joined: 2014-03-20 22:40

Re: new install won't load, no bootloader?

#16 Post by Michael »

Just a followup ... if people come across this later.

The reformatting of the large drive with ext3 did not fix the problem. In fact, it got stuck during installation requiring a "pull the plug" since there was no other way to talk to the system.

From /var/sys/log:
Errors were encountered while processing:
/var/cache/apt/archives/linux-image-3.2.0.4-orion5x_3.2.52-2_armel.des

Sub-process /usr/bin/dpkg returned an error code (1)

base-installer: error: exiting on error base-installer/kernel/failed-install
The weird thing was that the original drive in there (a 500 GB drive) worked just fine, without any of the above steps. Was there a problem with the harddrive?

I reinstalled Debian once more onto the 500GB, and then inserted the larger drive into a second bay of the NAS.
Now /dev/sda1,2,3,5 came up just fine.
/dev/sdb came with a warning

#fdisk -l

WARNING: GPT (GUID Partition Table) detected on '/dev/sdb'! The util fdisk doesn't support GPT. Use GNU Parted.
So Debian put a newer partition table on the larger drive (only?). Could that have been the issue with booting from that larger drive?

I am now booting from the 500 GB system, having partitioned the larger harddrive into a single ext4 partition for all data files.
It seems to be running just fine.


Thanks for all the support.

User avatar
kiyop
Posts: 3983
Joined: 2011-05-05 15:16
Location: Where persons without desire to improve themselves fear to tread, in Japan
Been thanked: 3 times

Re: new install won't load, no bootloader?

#17 Post by kiyop »

Michael wrote:The reformatting of the large drive with ext3 did not fix the problem.
Thank you for reporting that :)
Michael wrote:In fact, it got stuck during installation requiring a "pull the plug" since there was no other way to talk to the system.
I wonder if your installation media is corrupted.
Michael wrote:
Errors were encountered while processing:
/var/cache/apt/archives/linux-image-3.2.0.4-orion5x_3.2.52-2_armel.des

Sub-process /usr/bin/dpkg returned an error code (1)

base-installer: error: exiting on error base-installer/kernel/failed-install
Maybe a bug. Maybe the error in the installation media. I am not sure.
Michael wrote:The weird thing was that the original drive in there (a 500 GB drive) worked just fine, without any of the above steps. Was there a problem with the harddrive?
Maybe.
Michael wrote:I reinstalled Debian once more onto the 500GB, and then inserted the larger drive into a second bay of the NAS.
Now /dev/sda1,2,3,5 came up just fine.
Maybe there is no error in the larger HDD. I do not understand well.
Michael wrote:/dev/sdb came with a warning
#fdisk -l

WARNING: GPT (GUID Partition Table) detected on '/dev/sdb'! The util fdisk doesn't support GPT. Use GNU Parted.
It is a natural warning. "fdisk" cannnot deal well the media with GPT. If the size of a media (with 512bytes sector) is larger than 2TB, GPT instead of old MSDOS partition table is required to fully use the media.
Michael wrote:I am now booting from the 500 GB system, having partitioned the larger harddrive into a single ext4 partition for all data files.
It seems to be running just fine.
Congratulations! :)
Openbox, JWM: Jessie, Sid, Arch / Win XP (on VirtualBox), 10
http://kiyoandkei.bbs.fc2.com/

Post Reply