DSM-G600, DNS-3xx and NSA-220 Hack Forum

Unfortunately no one can be told what fun_plug is - you have to see it for yourself.

You are not logged in.

Announcement

#1 2011-01-12 22:03:02

dhub
Member
Registered: 2011-01-01
Posts: 112

Convincing the DNS323 firmware that a pre-formatted disk isn't new

I'm playing with running iSCSI on my dns-323 and I've been experimenting with switching form using files to back the iSCSI luns to LVM logical volumes.  I'm running into one very frustrating issue and that is if I do something to my alt-f funplug script it boots the normal dlink 1.09 firmware which sees my disk with it's LVM partition and wants to format it (made more annoying by my cat jumping onto my keyboard and answering yes to the prompt)

Is there a way to convince the default firmware to ignore the disk?

Offline

 

#2 2011-01-13 22:29:42

puterboy
Member
Registered: 2008-09-18
Posts: 306

Re: Convincing the DNS323 firmware that a pre-formatted disk isn't new

I'm trying to do a similar thing.
I want to use /dev/sda3 (and /dev/sdb3) which are unused as an extended
partition which I can then divide into multiple logical partitions which I will use for reloading debian and other stuff.

I repartitioned to make /dev/sda2 smaller to leave room for logical partitions.
I carefully copied back the contents of /dev/sda4 and the .systemfile of /dev/sda2

I kept the size and location of /dev/sda1 and /dev/sda4 unchanged.

But still every time I reboot it wants to repartition the entire drive.

So, I'm not sure what logic it does to check whether the drive is new or not.

Any ideas on how to fake out the firmware so it doesn't try to repartition?

Offline

 

#3 2011-01-14 18:04:30

puterboy
Member
Registered: 2008-09-18
Posts: 306

Re: Convincing the DNS323 firmware that a pre-formatted disk isn't new

OK I figured it out.
You need to run hd_verify -w with the /mnt/HD_a2 and /mnt/HD_a4 partitions mounted (and probably also /mnt/HD_b4 if you have a second drive).

I ended up copying over the old .systemfile on /dev/sda4 (and similarly for /dev/sdb4 if you have them).
And then I updated the mdadm.conf to make sure the /dev/md0 UUID was correct

Offline

 

#4 2011-01-18 17:40:26

dhub
Member
Registered: 2011-01-01
Posts: 112

Re: Convincing the DNS323 firmware that a pre-formatted disk isn't new

I'm going to have to try hd_verify -w .  If that works I'll be doing the happy dance for sure.

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2010 PunBB