The railroads have thousands of large portable generators: 
Winter 1998: Several locomotives were driven under their own power down city streets, with no tracks, to provide emergency power.
North American Ice Storm of 1998 - Wikipedia, the free encyclopedia
In addition to help residents, CN locomotives (CN3502 and CN3555) were moved off the tracks and used to provide power to residents of Boucherville and Coteau-du-Lac, south and west of Montreal respectively.
http://www.railpictures.net/photo/346295/
Winter 1998: Several locomotives were driven under their own power down city streets, with no tracks, to provide emergency power.
North American Ice Storm of 1998 - Wikipedia, the free encyclopedia
In addition to help residents, CN locomotives (CN3502 and CN3555) were moved off the tracks and used to provide power to residents of Boucherville and Coteau-du-Lac, south and west of Montreal respectively.
http://www.railpictures.net/photo/346295/