Welcome! Log In Create A New Profile

Advanced

Lenovo IX2-ng question

Posted by feldwebel 
feldwebel
Lenovo IX2-ng question
February 05, 2019 06:11AM
Hi there,

I have a Lenovo IX2-ng with stock u-boot (as far as I know it can't be updated anyway) and with linux-4.15.2-kirkwood-tld-1-bodhi.tar.bz2 installed on an old HDD.

My interest is replace the HDD with a SSD. Can it boot debian from a SSD ?



Edited 1 time(s). Last edit at 02/05/2019 06:22AM by bodhi.
Re: Lenovo IX2-ng question
February 05, 2019 06:22AM
Yes, it can.

-bodhi
===========================
Forum Wiki
bodhi's corner
feldwebel
Re: Lenovo IX2-ng question
February 10, 2019 01:23PM
Thanks. I have some doubts of how I should proceed to make the SSD future-proof. I plan to use this device as a small cloud storage and media server.

I'm thinking to format the disk using MBR, create an ext2 boot partition, one ext4 for rootfs and one more ext4 for data and leaving at the end about 10% percent unnallocated for provisioning.

Is there any advantage here for using GPT with 100MB free at the start and dd-ing boot image there ?

Or could be even more efficient for me to run the debian from a USB stick ?

I'm not really sure of the best option.
Re: Lenovo IX2-ng question
February 10, 2019 02:34PM
feldwebel,

I would use 2 MBR partitions. 20GB for rootfs, formatted as Ext3. The rest (minus 100MB) for data, formatted as Ext4.

And a swap file of 1GB on the rootfs.

GPT would be unecessary if the disk is small (<= 2TB).

USB rootfs is not as efficient without doing a lot of tweaks. However, I usually run USB rootfs on smaller Kirkwood plugs (so that it can be reused between plugs that don't have SATA and ones that have SATA, such as Dockstar and GoFlex Net).

-bodhi
===========================
Forum Wiki
bodhi's corner
feldwebel
Re: Lenovo IX2-ng question
February 10, 2019 02:57PM
Thanks for the advice, sounds good.

But is the u-boot from Lenovo Ix2-ng capable of booting from ext3 partition ?
Re: Lenovo IX2-ng question
February 10, 2019 03:27PM
feldwebel,

> Thanks for the advice, sounds good.
>
> But is the u-boot from Lenovo Ix2-ng capable of
> booting from ext3 partition ?

That should be OK.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Lenovo IX2-ng question
February 10, 2019 06:09PM
It should boot from ext3, it's the partition format that is important (GPT won't work).

You can get around the stock u-boot limitations on these boxes, here's what I did;

IX2-DL howto

Remember to give extra space between the kernel and initrd when loading u-boot, the stock u-boot can be problematic with the sizes of newer kernels.
feldwebel
Re: Lenovo IX2-ng question
February 12, 2019 02:37AM
jdwl101,
I've read the howto, very useful info, helped me to get it working when I used the NAS as a big storage backup. Now I don't need that workaround as MBR is fine for me.

It successfully boot from an ext3 partition, but after some documenting found out that the journaling feature of that file system is harmful for a SSD. I think I'll may go go with 3 partitions after all: ext2 boot, ext4 rootfs and ext4 data..I think I have to document more to get the right decision.

Playing around with the debian ( by the way thanks a lot for the rootfs, kernels an tutorials bodhi) raised a few questions for me. When downloading something on the box the CPU temperature reaches as much as 85 degrees celsius, is this ok ? Seems a bit high. Also, I managed to control the LEDS on the box, but did not manage to configure the button to initiate shutdown. Is it possible on this box ?
Re: Lenovo IX2-ng question
February 12, 2019 12:53PM
feldwebel,

> It successfully boot from an ext3 partition, but
> after some documenting found out that the
> journaling feature of that file system is harmful
> for a SSD. I think I'll may go go with 3
> partitions after all: ext2 boot, ext4 rootfs and
> ext4 data..

There is really no gain in your configuration. The ext4 rootfs is under similar journaling policy. The Ext2 boot only help in avoiding corruption if you set it to Read-Only (Ext2 is prone to be corrupted when you have a power failure). If the Ext4 rootfs is too corrupted, you can't boot the box successful anyway.

FWIW, the 3-partition scheme is a throw back to the old day.

To make absolutely sure the rootfs is not frequently written to, see the Wiki thread:

Quote

Flash drives issues

How to prolong the life of your rootfs USB thumb drive
Overprovisioning A Flash Drive?


>
> Playing around with the debian ( by the way thanks
> a lot for the rootfs, kernels an tutorials bodhi)
> raised a few questions for me. When downloading
> something on the box the CPU temperature reaches
> as much as 85 degrees celsius, is this ok ? Seems
> a bit high. Also, I managed to control the LEDS on
> the box, but did not manage to configure the
> button to initiate shutdown. Is it possible on
> this box ?

Yes. It should be possible. The poweroff is defined in the DTS.

Install a key daemon as instructed in the Wiki thread:
https://forum.doozan.com/read.php?2,23630

Quote

Key daemon (button control)

Multimedia keyboard daemon for Linux

And define the shutdown as the action for Power button.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Lenovo IX2-ng question
February 12, 2019 02:33PM
Your cpu temp is fine, mine get very hot but the Kirkwood doesn’t care.

You could stick a heat sink on, but it’s not needed.

SSD won’t care about the journals either.
feldwebel
Re: Lenovo IX2-ng question
February 13, 2019 03:40AM
Ok, got it. Thanks a lot for the Wiki Thread, there I can find the answers to all my questions. And you're right, the 3 partition scheme is mostly outdated.

It's a little bit complicated sticking a heat sink on the cpu and if those temps are fine, it's really not worth it.

Thanks.
feldwebel
Re: Lenovo IX2-ng question
February 15, 2019 02:18PM
I've reformatted the SSD with 2 partitions: 20GB rootfs and the rest a data partition.

Now the boot hangs on "Starting Linux kernel". What could be the problem ? Below are the bootcmd and bootargs I'm using.

For installing the rootfs I've followed bodhi steps from https://forum.doozan.com/read.php?2,12096 (just like the last time, when it worked..)

bootcmd=ide reset; ext2load ide 1:1 0x800000 /boot/uImage; ext2load ide 1:1 0x1100000 /boot/uInitrd; bootm 0x800000 0x1100000
bootargs=console=ttyS0,115200 root=/dev/sda1 rootdelay=10 mtdparts=orion_nand:0x80000@0(uboot),0x20000@0xa0000(env),0x20000@0xc0000(env2),0x300000@0x100000(uImage),0x400000@0x400000(initrd),0x3f800000@0x800000(boot),1024m@0x0(flash) earlyprintk=serial

Re: Lenovo IX2-ng question
February 15, 2019 03:27PM
feldwebel,

When you have more than 1 partition, the bootargs needs to reflect the changes. Using the partition label will help the kernel to mount the rootfs correctly.

bootargs=console=ttyS0,115200 root=LABEL=rootfs rootdelay=10

Since you have serial console, you can also use a better bootargs, like this:

bootargs=console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 earlyprintk=serial

-bodhi
===========================
Forum Wiki
bodhi's corner
feldwebel
Re: Lenovo IX2-ng question
February 16, 2019 05:37AM
Sadly I've tried specifying the label too and did not work. Also I have the earlyprintk included in my bootargs. Could it be from the mtdparts variable ?
Re: Lenovo IX2-ng question
February 16, 2019 01:15PM
feldwebel Wrote:
-------------------------------------------------------
> Sadly I've tried specifying the label too and did
> not work. Also I have the earlyprintk included in
> my bootargs. Could it be from the mtdparts
> variable ?

Please post entire serial console boot log. It'll show us why.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Lenovo IX2-ng question
February 16, 2019 01:30PM
Hi, you haven’t left enough space for the kernel.
Load the initrd to 2100000 and it should boot.
Re: Lenovo IX2-ng question
February 16, 2019 01:41PM
J's guess is probably right!

However, please post the boot log anyway.

-bodhi
===========================
Forum Wiki
bodhi's corner
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: