From: Nahum Shalman [mailto:[email protected]] 
Sent: 星期五, 二月 19, 2016 21:55
To: [email protected]
Subject: Re: [smartos-discuss] enable network/physical in noinstall/recovery?

If you know the mac address of the NIC you want to bring online, you can edit 
the kernel command line within grub and append the following stuff:

,admin_mac=11:22:33:44:55:66,admin_ip=dhcp
or
,admin_mac=11:22:33:44:55:66,admin_ip=192.168.x.y,admin_netmask=255.255.255.0,admin_gateway=192.168.x.1

[Fred]: I tried. It seems it did not work.

If you can't edit the kernel command line, the alternative to getting the 
system to finish coming up is to manually create the /usbkey directory, and 
create a minimal /usbkey/config file with the networking configuration you 
want. After that "sysinfo -f" then "svcadm clear network/physical" and the 
system should finish bringing services online.

You'll probably need to fix up /etc/resolv.conf if you want to make outbound 
connections.

[Fred]: It works well!

Be aware that you're bringing the machine online with a known root password 
that will work over SSH. You can replace the hash in the kernel command line 
with something else if you want to be extra cautious.

I hope that helps.

[Fred]: Are there comprehensive documents about all the parameters fed to 
kernel? Could the alternative way be
        Adding ",smartos=false,noimport=true" to the normal boot kernel?

To answer your original question about why there isn't a rescue mode that 
includes networking, I think the main reasons are:
1. SmartOS is often used on machines with multiple NICs. There's no way to know 
which to use without more information from the operator.
2. SmartOS is often used on networks with no DHCP server. Without being told 
what IP address to use there would be no way for SmartOS to configure working 
networking.
3. The system would then come online with a known root password and SSH running 
and that could be dangerous.
4. In light of those other reasons, no one has written code for it.

[Fred]: Hmmmmm, what is your way to restore a bad zpool like zones?

Thanks.

Fred


On 02/19/2016 08:03 AM, Fred Liu wrote:
Yeah. That is doable. But because there is no zpool imported, network/physical 
can’t be started. And a lot of protocols can’t run neither.
 
Thanks.
 
Fred
From: Jorge Schrauwen [mailto:[email protected]] 
Sent: 星 期五, 二月 19, 2016 19:21
To: [email protected]
Cc: Fred Liu
Subject: Re: [smartos-discuss] enable network/physical in noinstall/recovery?
 
You can use ifconfig to bring it up manually.
ifconfig e1000g0 inet auto-dhcp (from memory so it may be incorrect)
 
 
On 2016-02-19 11:30, Fred Liu wrote:
Hi,
 
“noinstall/recovery” is really helpful to fix/save zpools. But it is offline. 
Is it hard to enable networking in it? Just like “fail-safe-mode-with-network”.
Nobody wants to recover from remote backup but that is the ideal life.
 
 
Thanks.
 
Fred

smartos-discuss | Archives | Modify Your Subscription




-------------------------------------------
smartos-discuss
Archives: https://www.listbox.com/member/archive/184463/=now
RSS Feed: https://www.listbox.com/member/archive/rss/184463/25769125-55cfbc00
Modify Your Subscription: 
https://www.listbox.com/member/?member_id=25769125&id_secret=25769125-7688e9fb
Powered by Listbox: http://www.listbox.com

Reply via email to